fputs($LOGFP, sprintf("%s %s[%d] %-8s %s\n", strftime('%c'),
basename($argv[0]), getmypid(), loglevel2str($level), $str));
}
}
function loglevel2str($level) {
fputs($LOGFP, sprintf("%s %s[%d] %-8s %s\n", strftime('%c'),
basename($argv[0]), getmypid(), loglevel2str($level), $str));
}
}
function loglevel2str($level) {