Welcome! Log In Create A New Profile

Advanced

Core: added signal name to "signal process started" logging

Xiaochen Wang
December 17, 2014 11:06PM
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 <wangxiaochen0@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
Subject Author Views Posted

Core: added signal name to "signal process started" logging

Xiaochen Wang 5757 December 17, 2014 11:06PM

Re: Core: added signal name to "signal process started" logging

Maxim Dounin 643 December 19, 2014 12:28PM

Re: Core: added signal name to "signal process started" logging

Xiaochen Wang 674 December 23, 2014 09:12PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 53
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready