ALT Linux Bugzilla
– Attachment 786 Details for
Bug 6359
невозможно выбрать facility при записи в syslog.
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
syslog facility patch часть вторая.
php-4.3.10-alt-syslog-facilities.patch (text/plain), 2.65 KB, created by
algor
on 2005-03-31 12:22:00 MSD
(
hide
)
Description:
syslog facility patch часть вторая.
Filename:
MIME Type:
Creator:
algor
Created:
2005-03-31 12:22:00 MSD
Size:
2.65 KB
patch
obsolete
>--- php-4.3.10.orig/main/main.c 2004-10-01 18:27:13 +0400 >+++ php-4.3.10/main/main.c 2005-03-31 12:08:33 +0400 >@@ -330,6 +330,7 @@ PHP_INI_BEGIN() > STD_PHP_INI_ENTRY("default_charset", SAPI_DEFAULT_CHARSET, PHP_INI_ALL, OnUpdateString, default_charset, sapi_globals_struct,sapi_globals) > STD_PHP_INI_ENTRY("default_mimetype", SAPI_DEFAULT_MIMETYPE, PHP_INI_ALL, OnUpdateString, default_mimetype, sapi_globals_struct,sapi_globals) > STD_PHP_INI_ENTRY("error_log", NULL, PHP_INI_ALL, OnUpdateString, error_log, php_core_globals, core_globals) >+ STD_PHP_INI_ENTRY("error_log_facility", NULL, PHP_INI_ALL, OnUpdateString, error_log_facility, php_core_globals, core_globals) > STD_PHP_INI_ENTRY("extension_dir", PHP_EXTENSION_DIR, PHP_INI_SYSTEM, OnUpdateStringUnempty, extension_dir, php_core_globals, core_globals) > STD_PHP_INI_ENTRY("gpc_order", "GPC", PHP_INI_ALL, OnUpdateStringUnempty, gpc_order, php_core_globals, core_globals) > STD_PHP_INI_ENTRY("include_path", PHP_INCLUDE_PATH, PHP_INI_ALL, OnUpdateStringUnempty, include_path, php_core_globals, core_globals) >@@ -377,12 +378,41 @@ PHPAPI void php_log_err(char *log_messag > char error_time_str[128]; > struct tm tmbuf; > time_t error_time; >+#ifdef HAVE_SYSLOG_H >+ int facility = LOG_LOCAL0; >+#endif > > /* Try to use the specified logging location. */ > if (PG(error_log) != NULL) { > #ifdef HAVE_SYSLOG_H > if (!strcmp(PG(error_log), "syslog")) { >- php_syslog(LOG_NOTICE, "%.500s", log_message); >+ if (PG(error_log_facility) != NULL) { >+ if (!strcmp(PG(error_log_facility), "LOCAL0")) { >+ facility = LOG_LOCAL0; >+ } >+ else if (!strcmp(PG(error_log_facility), "LOCAL1")) { >+ facility = LOG_LOCAL1; >+ } >+ else if (!strcmp(PG(error_log_facility), "LOCAL2")) { >+ facility = LOG_LOCAL2; >+ } >+ else if (!strcmp(PG(error_log_facility), "LOCAL3")) { >+ facility = LOG_LOCAL3; >+ } >+ else if (!strcmp(PG(error_log_facility), "LOCAL4")) { >+ facility = LOG_LOCAL4; >+ } >+ else if (!strcmp(PG(error_log_facility), "LOCAL5")) { >+ facility = LOG_LOCAL5; >+ } >+ else if (!strcmp(PG(error_log_facility), "LOCAL6")) { >+ facility = LOG_LOCAL6; >+ } >+ else if (!strcmp(PG(error_log_facility), "LOCAL7")) { >+ facility = LOG_LOCAL7; >+ } >+ } >+ php_syslog(facility | LOG_NOTICE, "%.500s", log_message); > return; > } > #endif >--- php-4.3.10.orig/main/php_globals.h 2003-05-18 14:22:16 +0400 >+++ php-4.3.10/main/php_globals.h 2005-03-31 11:59:49 +0400 >@@ -82,6 +82,7 @@ struct _php_core_globals { > zend_bool ignore_repeated_source; > zend_bool report_memleaks; > char *error_log; >+ char *error_log_facility; > > char *doc_root; > char *user_dir;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 6359
:
785
| 786