From: Leandro Lucarella Date: Mon, 4 Apr 2005 01:06:55 +0000 (+0000) Subject: Se homogeinizan más los logs. X-Git-Tag: svn_import~15 X-Git-Url: https://git.llucax.com/software/sercom-old.git/commitdiff_plain/fda912fe94d64188e6735ffea23c4a972739276d Se homogeinizan más los logs. --- diff --git a/doc/examples/log.ini b/doc/examples/log.ini index 7cb42ee..bd9a5aa 100644 --- a/doc/examples/log.ini +++ b/doc/examples/log.ini @@ -64,7 +64,7 @@ formatter = mail args = ('localhost', 'from@example.com', 'to@example.com', '[SERCOM] Log') [formatter_file] -format = %(asctime)s %(name)5s[%(process)d] %(levelname)-8s %(message)s +format = %(asctime)s %(name)8s[%(process)d] %(levelname)-8s %(message)s datefmt = %c [formatter_stderr] diff --git a/src/T/log.php b/src/T/log.php index 4511b26..1fa5324 100644 --- a/src/T/log.php +++ b/src/T/log.php @@ -16,7 +16,7 @@ function logs($str, $level = INFO) { 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)); } }