global $LOGLEVEL, $LOGFP, $argv;
if ($str and ($LOGLEVEL & $level) == $level) {
fputs($LOGFP, sprintf("%s %s[%d] %-8s %s\n", strftime('%c'),
- substr(basename($argv[0]), 3), getmypid(),
+ sprintf('% 8s', substr(basename($argv[0]), 3)), getmypid(),
loglevel2str($level), $str));
}
}