From: Christian Herdtweck Date: Wed, 21 Jan 2015 10:33:29 +0000 (+0100) Subject: Raised importance of log output in signal handler: info for most, notice for term... X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=8ecf38bef0476c3d14fd3442273b41e160eacf48;p=pingcheck Raised importance of log output in signal handler: info for most, notice for term/kill --- diff --git a/src/main.cpp b/src/main.cpp index f3c2a82..68a0c7e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -311,13 +311,13 @@ signal_data_struct signal_data; void signal_handler(int param) { if (param == SIGUSR1) - GlobalLogger.debug() << "signal handler called with SIGUSR1." << endl; + GlobalLogger.info() << "signal handler called with SIGUSR1." << endl; else if (param == SIGUSR2) - GlobalLogger.debug() << "signal handler called with SIGUSR2." << endl; + GlobalLogger.info() << "signal handler called with SIGUSR2." << endl; else if (param == SIGTERM) - GlobalLogger.debug() << "signal handler called with SIGTERM." << endl; + GlobalLogger.info() << "signal handler called with SIGTERM." << endl; else if (param == SIGINT) - GlobalLogger.debug() << "signal handler called with SIGINT." << endl; + GlobalLogger.info() << "signal handler called with SIGINT." << endl; else GlobalLogger.warning() << "signal handler called with unexpected signal " << param << endl; signal_data.signaled_flag = param; @@ -354,18 +354,18 @@ void signal_checker( const boost::system::error_code &error ) { int new_log_level = I2n::Logger::get_log_level()+1; I2n::Logger::set_log_level( new_log_level ); - GlobalLogger.debug() << "Increased log level to " + GlobalLogger.info() << "Increased log level to " << I2n::Logger::get_log_level_string(); } else if ( signaled_flag == SIGUSR2 ) { I2n::Logger::set_log_level( signal_data.config_log_level ); - GlobalLogger.debug() << "Reset log level to normal (" + GlobalLogger.info() << "Reset log level to normal (" << I2n::Logger::get_log_level_string() << ")"; } else if ( ( signaled_flag == SIGTERM ) || ( signaled_flag == SIGINT )) { - GlobalLogger.debug() << "Received signal SIGINT/SIGTERM --> will stop" << endl; + GlobalLogger.notice() << "Received signal SIGINT/SIGTERM --> will stop" << endl; want_stop = true; } else