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