Bug #77913 [Com]: error_log via syslog: PHP will split msg on line break
| From: | spam2 at rhsoft dot net | Date: | Tue, 16 Apr 2019 22:30:41 +0000 |
| Subject: | Bug #77913 [Com]: error_log via syslog: PHP will split msg on line break | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-220499@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77913&edit=1
ID: 77913
Comment by: spam2 at rhsoft dot net
Reported by: whissi at whissi dot de
Summary: error_log via syslog: PHP will split msg on line
break
Status: Assigned
Type: Bug
Package: *General Issues
PHP Version: 7.3.4
Assigned To: ab
Block user comment: N
Private report: N
New Comment:
> I think the newline treatment is a good thing and probably
> what the average developer would expect to happen
for sure not, i would expect and code that in a away that the new line is replaced by a space
because grep and friends don't work very nice with magically wrapped lines
Previous Comments:
------------------------------------------------------------------------
[2019-04-16 21:42:41] requinix@php.net
https://github.com/php/php-src/commit/a1f3a0105d885879102d366de506c353a75c8d04
I think the newline treatment is a good thing and probably what the average developer would expect
to happen, BC break or not, so IMO this should be a doc bug.
------------------------------------------------------------------------
[2019-04-16 19:49:17] whissi at whissi dot de
And if this was a desired change, maybe rename "syslog.filter=no-ctrl" to
"syslog.filter=no-ctrl-but-line-breaks" :-)
I.e. you either _filter_ all ctrl chars like the option says or none. But filtering some but
handle/interpret others isn't good.
------------------------------------------------------------------------
[2019-04-16 19:43:40] whissi at whissi dot de
Not when this is a backward incompatible change.
Of course, if this was a desired change, please add it to https://www.php.net/manual/en/migration73.incompatible.php
and in addition please provide a way to send multi-line messages.
------------------------------------------------------------------------
[2019-04-16 19:36:08] requinix@php.net
Isn't it a good thing that the line break is being recognized and handled?
------------------------------------------------------------------------
[2019-04-16 17:40:33] whissi at whissi dot de
Even with "syslog.filter=no-ctrl" when you would expect a syslog message like
> Apr 16 16:54:09 myhost php: This is line #1This is line #2
because PHP has filtered control chars like line break, you end up with two messages, so filtering
doesn't work as expected.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=77913
--
Edit this bug report at https://bugs.php.net/bug.php?id=77913&edit=1