]> granicus.if.org Git - php/commitdiff
Added backwards compability with php_log_err by using macro
authorJani Ollikainen <jani.ollikainen@valve.fi>
Wed, 6 Apr 2016 11:14:41 +0000 (14:14 +0300)
committerAnatol Belski <ab@php.net>
Thu, 2 Jun 2016 11:25:29 +0000 (13:25 +0200)
ext/standard/basic_functions.c
main/main.c
main/php.h

index 3f363d1ccee1e6e098756d274cabf91c6b1b28a0..5fb5246d92a08b50da4cc8b337d4722ab161c3c4 100644 (file)
@@ -4704,7 +4704,7 @@ PHPAPI int _php_error_log_ex(int opt_err, char *message, size_t message_len, cha
                        break;
 
                default:
-                       php_log_err(message, LOG_NOTICE);
+                       php_log_err_with_severity(message, LOG_NOTICE);
                        break;
        }
        return SUCCESS;
index 0bf50e01ac2925a23b0a5e2727b943b4aa190dc1..cc4b30b462855aadf499278f2c29475622b9c182 100644 (file)
@@ -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);
                }
 
index d9a387e964dc7496877b96785cdde905632446a3..9e7fe46790163a12139d5fb87c1a30c740df66f5 100644 (file)
@@ -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()