Skip to content

Commit c855043

Browse files
committed
Rename none syslog.filter to all and update ini description
1 parent 2010c02 commit c855043

File tree

5 files changed

+25
-21
lines changed

5 files changed

+25
-21
lines changed

main/main.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,10 @@ static PHP_INI_MH(OnChangeMemoryLimit)
334334
*/
335335
static PHP_INI_MH(OnSetLogFilter)
336336
{
337-
const char *filter = ZSTR_VAL(new_value);
337+
const char *filter = ZSTR_VAL(new_value);
338338

339-
if (!strcmp(filter, "none")) {
340-
PG(syslog_filter) = PHP_SYSLOG_FILTER_NONE;
339+
if (!strcmp(filter, "all")) {
340+
PG(syslog_filter) = PHP_SYSLOG_FILTER_ALL;
341341
return SUCCESS;
342342
}
343343
if (!strcmp(filter, "no-ctrl")) {

main/php_syslog.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ PHPAPI void php_syslog(int priority, const char *format, ...) /* {{{ */
9494
else if (c == '\n') {
9595
syslog(priority, "%.*s", (int)sbuf.len, sbuf.c);
9696
smart_string_reset(&sbuf);
97-
} else if ((c < 0x20) && (PG(syslog_filter) == PHP_SYSLOG_FILTER_NONE))
97+
} else if ((c < 0x20) && (PG(syslog_filter) == PHP_SYSLOG_FILTER_ALL))
9898
smart_string_appendc(&sbuf, c);
9999
else {
100100
const char xdigits[] = "0123456789abcdef";

main/php_syslog.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#endif
3434

3535
/* Syslog filters */
36-
#define PHP_SYSLOG_FILTER_NONE 0
36+
#define PHP_SYSLOG_FILTER_ALL 0
3737
#define PHP_SYSLOG_FILTER_NO_CTRL 1
3838
#define PHP_SYSLOG_FILTER_ASCII 2
3939

php.ini-development

+10-8
Original file line numberDiff line numberDiff line change
@@ -517,14 +517,6 @@ report_memleaks = On
517517
; This setting is on by default.
518518
;report_zend_debug = 0
519519

520-
; Set this to disable filtering control characters (the default).
521-
; Some loggers only accept NVT-ASCII, others accept anything that's not
522-
; control characters. If your logger accepts everything, then no filtering
523-
; is needed at all.
524-
; Values are: ascii (space-tilde), no_ctrl (all characters space and above),
525-
; and none (all characters)
526-
;syslog.filter = ascii
527-
528520
; Store the last error/warning message in $php_errormsg (boolean).
529521
; This directive is DEPRECATED.
530522
; Default Value: Off
@@ -594,6 +586,16 @@ html_errors = On
594586
; the message. Only used when error_log is set to syslog.
595587
;syslog.facility = user
596588

589+
; Set this to disable filtering control characters (the default).
590+
; Some loggers only accept NVT-ASCII, others accept anything that's not
591+
; control characters. If your logger accepts everything, then no filtering
592+
; is needed at all.
593+
; Allowed values are:
594+
; ascii (only base ASCII characters)
595+
; no_ctrl (all characters except control characters)
596+
; all (all characters)
597+
;syslog.filter = ascii
598+
597599
;windows.show_crt_warning
598600
; Default value: 0
599601
; Development value: 0

php.ini-production

+10-8
Original file line numberDiff line numberDiff line change
@@ -522,14 +522,6 @@ report_memleaks = On
522522
; This setting is on by default.
523523
;report_zend_debug = 0
524524

525-
; Set this to disable filtering control characters (the default).
526-
; Some loggers only accept NVT-ASCII, others accept anything that's not
527-
; control characters. If your logger accepts everything, then no filtering
528-
; is needed at all.
529-
; Values are: ascii (space-tilde), no_ctrl (all characters space and above),
530-
; and none (all characters)
531-
;syslog.filter = ascii
532-
533525
; Store the last error/warning message in $php_errormsg (boolean). Setting this value
534526
; to On can assist in debugging and is appropriate for development servers. It should
535527
; however be disabled on production servers.
@@ -601,6 +593,16 @@ html_errors = On
601593
; the message. Only used when error_log is set to syslog.
602594
;syslog.facility = user
603595

596+
; Set this to disable filtering control characters (the default).
597+
; Some loggers only accept NVT-ASCII, others accept anything that's not
598+
; control characters. If your logger accepts everything, then no filtering
599+
; is needed at all.
600+
; Allowed values are:
601+
; ascii (only base ASCII characters)
602+
; no_ctrl (all characters except control characters)
603+
; all (all characters)
604+
;syslog.filter = ascii
605+
604606
;windows.show_crt_warning
605607
; Default value: 0
606608
; Development value: 0

0 commit comments

Comments
 (0)