From 3edf7d960cb14f2ee45944e7c567af92af25bda1 Mon Sep 17 00:00:00 2001 From: Jani Ollikainen Date: Tue, 29 Dec 2015 12:18:41 +0200 Subject: Logging to syslog with dynamic error levels (related to #49467) --- main/php.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index d0ec07c82e..d9a387e964 100644 --- a/main/php.h +++ b/main/php.h @@ -280,7 +280,7 @@ PHPAPI size_t php_write(void *buf, size_t size); PHPAPI size_t php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); PHPAPI int php_get_module_initialized(void); -PHPAPI ZEND_COLD void php_log_err(char *log_message); +PHPAPI ZEND_COLD void php_log_err(char *log_message, int syslog_type_int); int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); int cfgparse(void); END_EXTERN_C() -- cgit v1.2.1 From 0a04f6144884792e6b9fb28bc1b6cfe3772a446f Mon Sep 17 00:00:00 2001 From: Jani Ollikainen Date: Wed, 6 Apr 2016 14:14:41 +0300 Subject: Added backwards compability with php_log_err by using macro --- main/php.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index d9a387e964..9e7fe46790 100644 --- a/main/php.h +++ b/main/php.h @@ -280,7 +280,8 @@ PHPAPI size_t php_write(void *buf, size_t size); PHPAPI size_t php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); PHPAPI int php_get_module_initialized(void); -PHPAPI ZEND_COLD void php_log_err(char *log_message, int syslog_type_int); +#define php_log_err(msg) php_log_err_with_serevity(msg, LOG_NOTICE) +PHPAPI ZEND_COLD void php_log_err_with_severity(char *log_message, int syslog_type_int); int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); int cfgparse(void); END_EXTERN_C() -- cgit v1.2.1 From 73fd1fc6e567f78e8d4188690b615264a8962b66 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 2 Jun 2016 13:28:09 +0200 Subject: fix typo --- main/php.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 9e7fe46790..239aef2bb0 100644 --- a/main/php.h +++ b/main/php.h @@ -280,7 +280,7 @@ PHPAPI size_t php_write(void *buf, size_t size); PHPAPI size_t php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); PHPAPI int php_get_module_initialized(void); -#define php_log_err(msg) php_log_err_with_serevity(msg, LOG_NOTICE) +#define php_log_err(msg) php_log_err_with_severity(msg, LOG_NOTICE) PHPAPI ZEND_COLD void php_log_err_with_severity(char *log_message, int syslog_type_int); int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); int cfgparse(void); -- cgit v1.2.1 From d2bc82586b67882fdcdabac8e05cfbb4104bfd47 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 8 Jun 2016 08:10:09 +0200 Subject: fix php_log_err macro --- main/php.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 239aef2bb0..ed6a4d7189 100644 --- a/main/php.h +++ b/main/php.h @@ -280,7 +280,12 @@ PHPAPI size_t php_write(void *buf, size_t size); PHPAPI size_t php_printf(const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); PHPAPI int php_get_module_initialized(void); +#ifdef HAVE_SYSLOG_H +#include "php_syslog.h" #define php_log_err(msg) php_log_err_with_severity(msg, LOG_NOTICE) +#else +#define php_log_err(msg) php_log_err_with_severity(msg, 5) +#endif PHPAPI ZEND_COLD void php_log_err_with_severity(char *log_message, int syslog_type_int); int Debug(char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 1, 2); int cfgparse(void); -- cgit v1.2.1