Req #49467 [Com]: Errors are logged to syslog using LOG_NOTICE instead of LOG_ERR

From: Date: Wed, 12 Feb 2014 09:19:39 +0000
Subject: Req #49467 [Com]: Errors are logged to syslog using LOG_NOTICE instead of LOG_ERR
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184270@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=49467&edit=1 ID: 49467 Comment by: joop_boonen at web dot de Reported by: toby dot walsh at fxhome dot com Summary: Errors are logged to syslog using LOG_NOTICE instead of LOG_ERR Status: Open Type: Feature/Change Request Package: PHP options/info functions Operating System: * PHP Version: * Block user comment: N Private report: N New Comment: I also have exectly the same problem. Will this issue be solved in the near future? For me it would be an option that the default log level could be set. So that the logs aren't recorded as notice but my prefered log level. But ofcource the only right solution would be that the logs would have the correct level, where you can also filter on. Previous Comments: ------------------------------------------------------------------------ [2009-09-04 12:42:49] toby dot walsh at fxhome dot com Description: ------------ I'm using "error_log = syslog" in my php.ini to log all errors to syslog. But the errors end up being logged using the LOG_NOTICE log level instead of the LOG_ERR level. I've traced this back to the internal php_log_err function in main/main.c which uses php_syslog(LOG_NOTICE, "%.500s", log_message); when it should probably be using php_syslog(LOG_ERR, "%.500s", log_message); Reproduce code: --------------- Set the following directives in php.ini error_reporting = E_ALL & ~E_NOTICE log_errors = On error_log = syslog Then generate a syntax error with something like <?php test( ?> Expected result: ---------------- An error message should be logged to syslog with a log level of LOG_ERR Actual result: -------------- The error message is logged, but using a log level of LOG_NOTICE instead of LOG_ERR ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=49467&edit=1

« previous php.bugs (#184270) next »