diff src/core/ngx_syslog.h @ 8150:8771d35d55d0

Syslog: introduced error log handler. This ensures that errors which happen during logging to syslog are logged with proper context, such as "while logging to syslog" and the server name. Prodded by Safar Safarly.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 10 Mar 2023 07:43:50 +0300
parents 29adacffdefa
children 1c9264603adc
line wrap: on
line diff
--- a/src/core/ngx_syslog.h
+++ b/src/core/ngx_syslog.h
@@ -18,7 +18,8 @@ typedef struct {
     ngx_addr_t         server;
     ngx_connection_t   conn;
 
-    ngx_log_t         *log;
+    ngx_log_t          log;
+    ngx_log_t         *logp;
 
     unsigned           busy:1;
     unsigned           nohostname:1;