From 3692bb33cccdf3106df96883033b20ab9170c5a5 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 24 Feb 2014 09:09:46 -0500 Subject: [PATCH] LP#1284137: Avoid WARN logging on router shutdown Log received signals as DEBUG (misc signal) or INFO (during shutdown) in the router, since these are not error conditions, but normal operations. A warning may ultimately be logged at a higher level when the signal is unexpected. Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- src/router/osrf_router.c | 2 +- src/router/osrf_router_main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/router/osrf_router.c b/src/router/osrf_router.c index 359d98a..528dfa2 100644 --- a/src/router/osrf_router.c +++ b/src/router/osrf_router.c @@ -220,7 +220,7 @@ void osrfRouterRun( osrfRouter* router ) { if( (selectret = select(maxfd + 1, &set, NULL, NULL, NULL)) < 0 ) { if( EINTR == errno ) { if( router->stop ) { - osrfLogWarning( OSRF_LOG_MARK, "Top level select call interrupted by signal" ); + osrfLogInfo(OSRF_LOG_MARK, "Router shutting down"); break; } else diff --git a/src/router/osrf_router_main.c b/src/router/osrf_router_main.c index ba14551..202e99a 100644 --- a/src/router/osrf_router_main.c +++ b/src/router/osrf_router_main.c @@ -154,8 +154,8 @@ int main( int argc, char* argv[] ) { if( stop_signal ) { // Interrupted by a signal? Re-raise so the parent can see it. - osrfLogWarning( OSRF_LOG_MARK, "Interrupted by signal %d; re-raising", - (int) stop_signal ); + osrfLogDebug(OSRF_LOG_MARK, + "Router received signal %d; re-raising", (int) stop_signal); signal( stop_signal, SIG_DFL ); raise( stop_signal ); } -- 2.11.0