From 99ee8244b4eb9362e391faaabc990820653547ec Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Tue, 9 Dec 2014 16:01:09 +0100 Subject: [PATCH] improved logging output (once again) --- src/host/pingscheduler.cpp | 8 ++++---- src/icmp/icmppacketfactory.cpp | 3 +-- src/main.cpp | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/host/pingscheduler.cpp b/src/host/pingscheduler.cpp index d106452..bced749 100644 --- a/src/host/pingscheduler.cpp +++ b/src/host/pingscheduler.cpp @@ -169,7 +169,7 @@ void PingScheduler::start_pinging() // event processing loop, it is a blocking call! IoService.run(); //lint !e534 - GlobalLogger.notice() << "Ping thread was stopped."; + GlobalLogger.info() << "Ping thread was stopped."; } @@ -252,14 +252,14 @@ void PingScheduler::update_ping_interval() { PingIntervalInSec.speed_up(); - GlobalLogger.info() << "- Speeding up ping interval to: " << PingIntervalInSec << "s" + GlobalLogger.debug() << "- Speeding up ping interval to: " << PingIntervalInSec << "s" << endl; } else { PingIntervalInSec.back_to_original(); - GlobalLogger.info() << "- Stick to the original ping interval: " << PingIntervalInSec << "s" + GlobalLogger.debug() << "- Stick to the original ping interval: " << PingIntervalInSec << "s" << endl; } } @@ -269,7 +269,7 @@ void PingScheduler::update_ping_elapsed_time() ptime now = microsec_clock::universal_time(); time_resolution_traits_adapted64_impl::int_type elapsed_time_in_sec = (now - TimeSentLastPing).total_seconds(); - GlobalLogger.info() << "- Time elapsed since last ping: " << elapsed_time_in_sec << "s" << endl; + GlobalLogger.debug() << "- Time elapsed since last ping: " << elapsed_time_in_sec << "s" << endl; TimeSentLastPing = microsec_clock::universal_time(); } diff --git a/src/icmp/icmppacketfactory.cpp b/src/icmp/icmppacketfactory.cpp index 277a980..4828747 100644 --- a/src/icmp/icmppacketfactory.cpp +++ b/src/icmp/icmppacketfactory.cpp @@ -20,7 +20,6 @@ #include "icmp/icmppacketfactory.h" - #include #include "boost_assert_handler.h" @@ -72,7 +71,7 @@ IcmpPacketItem IcmpPacketFactory::create_icmp_packet( if ( !icmp_packet->read( is ) ) { - GlobalLogger.warning() << "ICMP packet creation failed" << endl; + GlobalLogger.info() << "ICMP packet creation failed" << endl; icmp_packet.reset(); // --> (!icmp_packet) is true // --> icmp_pinger will not try to continue working with this packet diff --git a/src/main.cpp b/src/main.cpp index 187fb07..0416b24 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -353,7 +353,7 @@ int main( int argc, const char *argv[] ) block_all_signals(); init_logger(); - GlobalLogger.notice() << "started"; + GlobalLogger.debug() << "logger initiated with default config"; PingSchedulerList scheduler_list; int ret_code = 0; @@ -367,6 +367,7 @@ int main( int argc, const char *argv[] ) GlobalLogger.info() << "Set LogLevel to " << I2n::Logger::get_log_level_string() << endl; set_log_output( configuration ); + GlobalLogger.notice() << "started"; bool daemon_mode = configuration->get_daemon(); if ( daemon_mode ) -- 1.7.1