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/main.c | 6 +++--- main/php.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'main') diff --git a/main/main.c b/main/main.c index 0bf50e01ac..cc4b30b462 100644 --- a/main/main.c +++ b/main/main.c @@ -607,9 +607,9 @@ PHPAPI int php_get_module_initialized(void) } /* }}} */ -/* {{{ php_log_err +/* {{{ php_log_err_with_severity */ -PHPAPI ZEND_COLD void php_log_err(char *log_message, int syslog_type_int) +PHPAPI ZEND_COLD void php_log_err_with_severity(char *log_message, int syslog_type_int) { int fd = -1; time_t error_time; @@ -1101,7 +1101,7 @@ static ZEND_COLD void php_error_cb(int type, const char *error_filename, const u } #endif spprintf(&log_buffer, 0, "PHP %s: %s in %s on line %d", error_type_str, buffer, error_filename, error_lineno); - php_log_err(log_buffer, syslog_type_int); + php_log_err_with_severity(log_buffer, syslog_type_int); efree(log_buffer); } 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