X-Git-Url: https://git.llucax.com/software/sercom-old.git/blobdiff_plain/5174fa9bd71e4f671d9788707e106296638a3c63..fda912fe94d64188e6735ffea23c4a972739276d:/src/T/log.php 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)); } }