From: Bjoern Sikora Date: Thu, 16 Oct 2014 11:08:44 +0000 (+0200) Subject: Added updated IP into update successful log message. X-Git-Tag: v1.1~4 X-Git-Url: http://developer.intra2net.com/git/?p=bpdyndnsd;a=commitdiff_plain;h=75a3fba658013198a3447a94db0061c51f53c66a Added updated IP into update successful log message. --- diff --git a/src/logger.cpp b/src/logger.cpp index 19ef01b..7e3beb8 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -992,13 +992,13 @@ void Logger::print_error_hostname_to_ip(const string& errMsg, const string& host * The update of the given service was successful. * @param service The service. */ -void Logger::print_update_service_successful(const string& service) const +void Logger::print_update_service_successful(const string& service, const std::string& ip_addr) const { int level = 0; if ( level <= Loglevel ) { ostringstream msg; - msg << "Updated service successful: " << service << endl; + msg << "Updated service successful: " << service << " to IP: " << ip_addr << endl; log_notice(msg.str()); } } diff --git a/src/logger.hpp b/src/logger.hpp index 7202410..cc3c1f0 100644 --- a/src/logger.hpp +++ b/src/logger.hpp @@ -166,7 +166,7 @@ public: void print_error_hostname_to_ip(const std::string& errMsg, const std::string& hostname) const; - void print_update_service_successful(const std::string& service) const; + void print_update_service_successful(const std::string& service, const std::string& ip_addr) const; void print_webcheck_no_ip(); diff --git a/src/service.cpp b/src/service.cpp index 45d833e..de500c2 100644 --- a/src/service.cpp +++ b/src/service.cpp @@ -307,7 +307,7 @@ void Service::update(const string& ip, const time_t current_time, bool changed_t // if update was successful, we need to set the Lastupdated and ActualIP base member. set_last_update(current_time,ip); ActualIP = ip; - Log->print_update_service_successful(service_name); + Log->print_update_service_successful(service_name,ip); ErrorCount = 0; ErrorServiceBlockedUntil = 0;