From 1a43fad56dc945c72a4ab711d2c9ff6d1a5a1502 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 30 Sep 2009 22:28:33 +0200 Subject: Added Format class for improved logging experience :) --- src/Client/Authenticators/ChallengeResponseAuthenticator.cpp | 2 +- src/Client/Authenticators/PasswordAuthenticator.cpp | 2 +- src/Client/InformationManager.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Client') diff --git a/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp b/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp index 92ced08..4c5fbf3 100644 --- a/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp +++ b/src/Client/Authenticators/ChallengeResponseAuthenticator.cpp @@ -115,7 +115,7 @@ void ChallengeResponseAuthenticator::authenticate(Common::Application *applicati throw Core::Exception(Core::Exception::NOT_AVAILABLE); } - application->logf(Core::Logger::LOG_VERBOSE, "Authenticating with method 'Challenge-Response' using hash '%s'...", hash.toLocale().c_str()); + application->log(Core::Logger::LOG_VERBOSE, Core::Format("Authenticating with method 'Challenge-Response' using hash '%1%'...") % hash); boost::shared_ptr request(new ChallengeResponseAuthRequest(application, username, password, hash)); diff --git a/src/Client/Authenticators/PasswordAuthenticator.cpp b/src/Client/Authenticators/PasswordAuthenticator.cpp index ac01d44..a4691a5 100644 --- a/src/Client/Authenticators/PasswordAuthenticator.cpp +++ b/src/Client/Authenticators/PasswordAuthenticator.cpp @@ -98,7 +98,7 @@ void PasswordAuthenticator::authenticate(Common::Application *application, Commo throw Core::Exception(Core::Exception::NOT_AVAILABLE); } - application->logf(Core::Logger::LOG_VERBOSE, "Authenticating with method 'Password' using hash '%s'...", hash.toLocale().c_str()); + application->log(Core::Logger::LOG_VERBOSE, Core::Format("Authenticating with method 'Password' using hash '%1%'...") % hash); boost::shared_ptr request(new PasswordAuthRequest(application, username, password, hash)); diff --git a/src/Client/InformationManager.cpp b/src/Client/InformationManager.cpp index 10827d9..5ef78d6 100644 --- a/src/Client/InformationManager.cpp +++ b/src/Client/InformationManager.cpp @@ -73,7 +73,7 @@ void InformationManager::daemonListRequestFinished(boost::shared_ptr lock(mutex); if(!packet || error) { - application->logf(Core::Logger::LOG_CRITICAL, "Host list request failed: %s", error.what()); + application->log(Core::Logger::LOG_CRITICAL, Core::Format("Host list request failed: %1%") % error); } else { const Common::XmlData::List *list = packet->getList("hosts"); -- cgit v1.2.3