mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Rename none syslog.filter to all and update ini description
This commit is contained in:
parent
2010c02e5c
commit
c85504386d
5 changed files with 25 additions and 21 deletions
|
@ -334,10 +334,10 @@ static PHP_INI_MH(OnChangeMemoryLimit)
|
||||||
*/
|
*/
|
||||||
static PHP_INI_MH(OnSetLogFilter)
|
static PHP_INI_MH(OnSetLogFilter)
|
||||||
{
|
{
|
||||||
const char *filter = ZSTR_VAL(new_value);
|
const char *filter = ZSTR_VAL(new_value);
|
||||||
|
|
||||||
if (!strcmp(filter, "none")) {
|
if (!strcmp(filter, "all")) {
|
||||||
PG(syslog_filter) = PHP_SYSLOG_FILTER_NONE;
|
PG(syslog_filter) = PHP_SYSLOG_FILTER_ALL;
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
if (!strcmp(filter, "no-ctrl")) {
|
if (!strcmp(filter, "no-ctrl")) {
|
||||||
|
|
|
@ -94,7 +94,7 @@ PHPAPI void php_syslog(int priority, const char *format, ...) /* {{{ */
|
||||||
else if (c == '\n') {
|
else if (c == '\n') {
|
||||||
syslog(priority, "%.*s", (int)sbuf.len, sbuf.c);
|
syslog(priority, "%.*s", (int)sbuf.len, sbuf.c);
|
||||||
smart_string_reset(&sbuf);
|
smart_string_reset(&sbuf);
|
||||||
} else if ((c < 0x20) && (PG(syslog_filter) == PHP_SYSLOG_FILTER_NONE))
|
} else if ((c < 0x20) && (PG(syslog_filter) == PHP_SYSLOG_FILTER_ALL))
|
||||||
smart_string_appendc(&sbuf, c);
|
smart_string_appendc(&sbuf, c);
|
||||||
else {
|
else {
|
||||||
const char xdigits[] = "0123456789abcdef";
|
const char xdigits[] = "0123456789abcdef";
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Syslog filters */
|
/* Syslog filters */
|
||||||
#define PHP_SYSLOG_FILTER_NONE 0
|
#define PHP_SYSLOG_FILTER_ALL 0
|
||||||
#define PHP_SYSLOG_FILTER_NO_CTRL 1
|
#define PHP_SYSLOG_FILTER_NO_CTRL 1
|
||||||
#define PHP_SYSLOG_FILTER_ASCII 2
|
#define PHP_SYSLOG_FILTER_ASCII 2
|
||||||
|
|
||||||
|
|
|
@ -517,14 +517,6 @@ report_memleaks = On
|
||||||
; This setting is on by default.
|
; This setting is on by default.
|
||||||
;report_zend_debug = 0
|
;report_zend_debug = 0
|
||||||
|
|
||||||
; Set this to disable filtering control characters (the default).
|
|
||||||
; Some loggers only accept NVT-ASCII, others accept anything that's not
|
|
||||||
; control characters. If your logger accepts everything, then no filtering
|
|
||||||
; is needed at all.
|
|
||||||
; Values are: ascii (space-tilde), no_ctrl (all characters space and above),
|
|
||||||
; and none (all characters)
|
|
||||||
;syslog.filter = ascii
|
|
||||||
|
|
||||||
; Store the last error/warning message in $php_errormsg (boolean).
|
; Store the last error/warning message in $php_errormsg (boolean).
|
||||||
; This directive is DEPRECATED.
|
; This directive is DEPRECATED.
|
||||||
; Default Value: Off
|
; Default Value: Off
|
||||||
|
@ -594,6 +586,16 @@ html_errors = On
|
||||||
; the message. Only used when error_log is set to syslog.
|
; the message. Only used when error_log is set to syslog.
|
||||||
;syslog.facility = user
|
;syslog.facility = user
|
||||||
|
|
||||||
|
; Set this to disable filtering control characters (the default).
|
||||||
|
; Some loggers only accept NVT-ASCII, others accept anything that's not
|
||||||
|
; control characters. If your logger accepts everything, then no filtering
|
||||||
|
; is needed at all.
|
||||||
|
; Allowed values are:
|
||||||
|
; ascii (only base ASCII characters)
|
||||||
|
; no_ctrl (all characters except control characters)
|
||||||
|
; all (all characters)
|
||||||
|
;syslog.filter = ascii
|
||||||
|
|
||||||
;windows.show_crt_warning
|
;windows.show_crt_warning
|
||||||
; Default value: 0
|
; Default value: 0
|
||||||
; Development value: 0
|
; Development value: 0
|
||||||
|
|
|
@ -522,14 +522,6 @@ report_memleaks = On
|
||||||
; This setting is on by default.
|
; This setting is on by default.
|
||||||
;report_zend_debug = 0
|
;report_zend_debug = 0
|
||||||
|
|
||||||
; Set this to disable filtering control characters (the default).
|
|
||||||
; Some loggers only accept NVT-ASCII, others accept anything that's not
|
|
||||||
; control characters. If your logger accepts everything, then no filtering
|
|
||||||
; is needed at all.
|
|
||||||
; Values are: ascii (space-tilde), no_ctrl (all characters space and above),
|
|
||||||
; and none (all characters)
|
|
||||||
;syslog.filter = ascii
|
|
||||||
|
|
||||||
; Store the last error/warning message in $php_errormsg (boolean). Setting this value
|
; Store the last error/warning message in $php_errormsg (boolean). Setting this value
|
||||||
; to On can assist in debugging and is appropriate for development servers. It should
|
; to On can assist in debugging and is appropriate for development servers. It should
|
||||||
; however be disabled on production servers.
|
; however be disabled on production servers.
|
||||||
|
@ -601,6 +593,16 @@ html_errors = On
|
||||||
; the message. Only used when error_log is set to syslog.
|
; the message. Only used when error_log is set to syslog.
|
||||||
;syslog.facility = user
|
;syslog.facility = user
|
||||||
|
|
||||||
|
; Set this to disable filtering control characters (the default).
|
||||||
|
; Some loggers only accept NVT-ASCII, others accept anything that's not
|
||||||
|
; control characters. If your logger accepts everything, then no filtering
|
||||||
|
; is needed at all.
|
||||||
|
; Allowed values are:
|
||||||
|
; ascii (only base ASCII characters)
|
||||||
|
; no_ctrl (all characters except control characters)
|
||||||
|
; all (all characters)
|
||||||
|
;syslog.filter = ascii
|
||||||
|
|
||||||
;windows.show_crt_warning
|
;windows.show_crt_warning
|
||||||
; Default value: 0
|
; Default value: 0
|
||||||
; Development value: 0
|
; Development value: 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue