|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patches1006-multiline-syslog (last revision 2017-07-05 20:37 UTC by philipp at redfish-solutions dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-07-05 20:43 UTC] philipp at redfish-solutions dot com
[2017-07-05 22:12 UTC] hanskrentel at yahoo dot de
[2017-07-05 23:18 UTC] philipp at redfish-solutions dot com
[2017-07-05 23:25 UTC] philipp at redfish-solutions dot com
[2017-07-05 23:26 UTC] spam2 at rhsoft dot net
[2017-07-11 04:16 UTC] philipp at redfish-solutions dot com
[2017-07-26 16:35 UTC] philipp at redfish-solutions dot com
[2017-08-04 11:54 UTC] krakjoe@php.net
[2017-08-04 12:19 UTC] spam2 at rhsoft dot net
[2017-08-04 18:54 UTC] philipp at redfish-solutions dot com
[2017-08-04 21:41 UTC] spam2 at rhsoft dot net
[2017-08-04 21:49 UTC] philipp at redfish-solutions dot com
[2017-08-04 21:58 UTC] spam2 at rhsoft dot net
[2017-08-04 22:05 UTC] philipp at redfish-solutions dot com
[2017-08-05 00:02 UTC] philipp at redfish-solutions dot com
[2017-08-05 03:59 UTC] spam2 at rhsoft dot net
[2017-08-07 03:57 UTC] philipp at redfish-solutions dot com
[2017-08-07 05:01 UTC] spam2 at rhsoft dot net
[2017-08-07 23:57 UTC] philipp at redfish-solutions dot com
[2017-08-08 08:57 UTC] spam2 at rhsoft dot net
[2017-08-15 20:50 UTC] philipp at redfish-solutions dot com
[2017-08-16 18:57 UTC] philipp at redfish-solutions dot com
[2017-08-19 14:07 UTC] ab@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: ab
[2017-08-19 14:07 UTC] ab@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 01:00:02 2025 UTC |
Description: ------------ I'm using php-7.1.6 on Linux (LEDE master). During development, I had an uncaught exception which generated the diagnostic: 2017-07-05T11:56:20-06:00 PowercodeBMU Powercode: Error: Call to undefined function fetch() in /www/lib/php/LogController.php:48 Stack trace: #0 /tmp/foo.php(7): LogIterator->valid() #1 {main} i.e. 4 lines of text with embedded newlines. syslog() doesn't handle this correctly, as each line is supposed to be prefixed with a timestamp, hostname, and tag... but only the first line is formatted correctly because syslog() is handling the buffer as a single string. The correct behavior is to explode this message on newlines and then write each part to syslog individually. My php.ini file contained: error_log = "syslog"; Test script: --------------- Just about any uncaught exception should trigger this. Expected result: ---------------- Correct logging should look like: 2017-07-05T11:56:20-06:00 PowercodeBMU Powercode: Error: Call to undefined function fetch() in /www/lib/php/LogController.php:48 2017-07-05T11:56:20-06:00 PowercodeBMU Powercode: Stack trace: 2017-07-05T11:56:20-06:00 PowercodeBMU Powercode: #0 /tmp/foo.php(7): LogIterator->valid() 2017-07-05T11:56:20-06:00 PowercodeBMU Powercode: #1 {main} note that each line is prefixed identically. Actual result: -------------- Per description.