It is useful to know which signal was sent to nginx master when we analyzed error.log. If error_log level is warn/error/crit/alert/emerg, we could not know this information from nginx master/worker error log.
The error log with this patch is changed as following: 2014/12/18 11:47:42 [notice] 17320#0: signal process started (reopen) 2014/12/18 11:47:44 [notice] 17346#0: signal process started (reload) # HG changeset patch # User Xiaochen Wang <wangxiaoch...@gmail.com> # Date 1418872566 -28800 # Node ID 179a8ce4f68f96c316e4daec3fa677cd7d4e0126 # Parent 99751fe3bc3b285801b434f7f707d87fa42b093e Core: added signal name to "signal process started" logging diff -r 99751fe3bc3b -r 179a8ce4f68f src/core/ngx_cycle.c --- a/src/core/ngx_cycle.c Fri Dec 12 20:25:42 2014 +0300 +++ b/src/core/ngx_cycle.c Thu Dec 18 11:16:06 2014 +0800 @@ -969,7 +969,8 @@ ngx_signal_process(ngx_cycle_t *cycle, c ngx_core_conf_t *ccf; u_char buf[NGX_INT64_LEN + 2]; - ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "signal process started"); + ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, + "signal process started (%s)", sig); ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel