Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105934 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 53443 invoked from network); 15 Jun 2019 10:32:05 -0000 Received: from unknown (HELO supernova.coretech.se) (213.134.98.20) by pb1.pair.com with SMTP; 15 Jun 2019 10:32:05 -0000 Received: by supernova.coretech.se (Postfix, from userid 1000) id B320B4A004; Sat, 15 Jun 2019 09:49:34 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by supernova.coretech.se (Postfix) with ESMTP id B152C80D5103 for ; Sat, 15 Jun 2019 09:49:34 +0200 (CEST) Date: Sat, 15 Jun 2019 09:49:34 +0200 (CEST) X-X-Sender: elu@supernova.coretech.se To: internals@lists.php.net Message-ID: User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Subject: [PATCH] Raw logging to syslog From: erik@coretech.se (Erik Lundin) Background: In newer versions of PHP the syslog logging is forced to multiline logging and it's not possible to turn this off. This is especially problematic when you have a lot of logging and need to search and find connected lines from a single call to syslog(). For example when debugging multiline sql-queries. Test code: syslog(LOG_INFO, "test1\t\ttest2\ntest3"); Old behaviour (PHP 5.4.16 (cli) - CentOS 7): Jun 15 08:55:45 server php: test1#011#011test2#012test3 New behaviour (PHP 7.4 (dev)- CentOS 7): Jun 15 08:55:45 server php: test1\x09\x09test2 Jun 15 08:55:45 server php: test3 After patch and with configuration value (syslog.filter=raw): Jun 15 08:55:45 server php: test1#011#011test2#012test3 Suggested change: This patch includes a new configuration value for syslog.filter (raw) which allows to send the logging data in it's raw form to the syslog. The code for the other configuration values should be untouched by this change. Link to pull request: https://github.com/php/php-src/pull/4265 -- Regards, Erik Lundin