X-Git-Url: https://git.llucax.com/software/sercom-old.git/blobdiff_plain/5174fa9bd71e4f671d9788707e106296638a3c63..7f32a60f31bd104bc04c102bf6c66dd2af7220e7:/src/T/log.php?ds=sidebyside diff --git a/src/T/log.php b/src/T/log.php index e7c5c2d..1fa5324 100644 --- a/src/T/log.php +++ b/src/T/log.php @@ -14,9 +14,10 @@ function logsdie($str, $level = CRITICAL) { function logs($str, $level = INFO) { global $LOGLEVEL, $LOGFP, $argv; - if ($str and $LOGLEVEL & $level) { + 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)); } }