comparison src/core/ngx_syslog.c @ 9224:c7c8354f99fa

Syslog: fixed duplicate errors with access logging to syslog. The ngx_syslog_send() function logs errors itself, so there is no need to additionally log errors in the caller, notably access log modules in http and stream. To ensure that incomplete and blocked writes are also logged, appropriate logging added to ngx_syslog_send().
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 01 Mar 2024 05:42:09 +0300
parents 8771d35d55d0
children 1c9264603adc
comparison
equal deleted inserted replaced
9223:697f452bc033 9224:c7c8354f99fa
317 ngx_log_error(NGX_LOG_ALERT, &peer->log, ngx_socket_errno, 317 ngx_log_error(NGX_LOG_ALERT, &peer->log, ngx_socket_errno,
318 ngx_close_socket_n " failed"); 318 ngx_close_socket_n " failed");
319 } 319 }
320 320
321 peer->conn.fd = (ngx_socket_t) -1; 321 peer->conn.fd = (ngx_socket_t) -1;
322
323 } else if ((size_t) n != len) {
324 ngx_log_error(NGX_LOG_CRIT, &peer->log, 0,
325 "send() incomplete");
322 } 326 }
323 327
324 return n; 328 return n;
325 } 329 }
326 330