Req #76229 [NEW]: wrong rsyslog parameters from php-fpm logs
From: aguytech at free dot fr
Operating system: debian9 stretch
PHP version: 7.0.29
Package: FPM related
Bug Type: Feature/Change Request
Bug description:wrong rsyslog parameters from php-fpm logs
Description:
------------
I catch wrong rsyslog parameters in fpm-php logs
here is wrong rsyslog parameters :
syslogtag=ool
programname=ool
app-name=ool
procid=
Test script:
---------------
Debian9 stretch
PHP 7.0.27-0+deb9u1 (cli) (built: Jan 5 2018 13:51:52) ( NTS )
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
rsyslogd 8.24.0,
"php-fpm.conf":
error_log = syslog
syslog.facility = daemon
syslog.ident = php7.0-fpm
log_level = notice
"test.php":
<?php
trigger_error("E_USER_WARNING", E_USER_WARNING);
rsyslog template:
template(name="ALL" type="string" string="%timegenerated%
-HOSTNAME=%HOSTNAME% -syslogtag=%syslogtag% -programname=%programname%
-syslogfacility=%syslogfacility%
-syslogfacility-text=%syslogfacility-text%
-syslogseverity=%syslogseverity%
-syslogseverity-text=%syslogseverity-text%
-syslogpriority=%syslogpriority%
-syslogpriority-text=%syslogpriority-text% -inputname=%inputname%
-app-name=%app-name% -procid=%procid% -msgid=%msgid%
-fromhost=%fromhost% -fromhost-ip=%fromhost-ip% %msg%\n")
Expected result:
----------------
it should be better to have 'www-test[6681]' prepending message for the
syslogtag parameters :
syslogtag=www-test[6681]
programname=www-test
app-name=www-test
procid=6681
At least 'pool' or 'Pool' in place of 'ool' to filter messages in
syslog.
Actual result:
--------------
php-fpm log:
Apr 17 13:13:52 -HOSTNAME=debian9-php -syslogtag=ool -programname=ool
-syslogfacility=3 -syslogfacility-text=daemon -syslogseverity=5
-syslogseverity-text=notice -syslogpriority=5
-syslogpriority-text=notice -inputname=imuxsock -app-name=ool -procid=-
-msgid=- -fromhost=debian9-php -fromhost-ip=127.0.0.1 www-test[6681]:
PHP Warning: E_USER_WARNING in /var/www/localhost/public_html/test.php
on line 2
syslogtag=ool
programname=ool
app-name=ool
procid=
--
Edit bug report at https://bugs.php.net/bug.php?id=76229&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76229&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76229&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76229&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76229&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76229&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76229&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76229&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76229&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76229&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76229&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76229&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76229&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76229&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76229&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76229&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76229&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76229&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76229&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76229&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76229&r=mysqlcfg
Thread (4 messages)
- aguytech at free dot fr