summaryrefslogtreecommitdiff
path: root/main/php_syslog.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-06-17 13:14:18 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-06-17 13:14:18 +0200
commit1b63528d3897c03e8dd0991a1e8438db8363be4f (patch)
treeed555ba1623ded3e28144e17715b1911cdc9d9b3 /main/php_syslog.c
parentd584f92195658b153a3898edac766ef09edf72b6 (diff)
parent9f0515c40c85d9c22cf46f7c42338354c398e4a7 (diff)
downloadphp-git-1b63528d3897c03e8dd0991a1e8438db8363be4f.tar.gz
Merge branch 'PHP-7.3' into PHP-7.4
Diffstat (limited to 'main/php_syslog.c')
-rw-r--r--main/php_syslog.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/main/php_syslog.c b/main/php_syslog.c
index bac29a9042..987ef9cc0c 100644
--- a/main/php_syslog.c
+++ b/main/php_syslog.c
@@ -76,6 +76,13 @@ PHPAPI void php_syslog(int priority, const char *format, ...) /* {{{ */
smart_string_0(&fbuf);
va_end(args);
+ if (PG(syslog_filter) == PHP_SYSLOG_FILTER_RAW) {
+ /* Just send it directly to the syslog */
+ syslog(priority, "%.*s", (int)fbuf.len, fbuf.c);
+ smart_string_free(&fbuf);
+ return;
+ }
+
for (ptr = fbuf.c; ; ++ptr) {
c = *ptr;
if (c == '\0') {