summaryrefslogtreecommitdiffstats
path: root/src/modules/UserConfigBackendKrb5
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-09-30 22:28:33 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-09-30 22:28:33 +0200
commit1a43fad56dc945c72a4ab711d2c9ff6d1a5a1502 (patch)
treee2b6847ce5e6a6d41269f1d2fa30011060abcd08 /src/modules/UserConfigBackendKrb5
parent241f1947580df7f905ed3d6969cc3a6a4bb99f5a (diff)
downloadmad-1a43fad56dc945c72a4ab711d2c9ff6d1a5a1502.tar
mad-1a43fad56dc945c72a4ab711d2c9ff6d1a5a1502.zip
Added Format class for improved logging experience :)
Diffstat (limited to 'src/modules/UserConfigBackendKrb5')
-rw-r--r--src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp6
-rw-r--r--src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp b/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp
index 61ad996..72c8160 100644
--- a/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp
+++ b/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.cpp
@@ -68,7 +68,7 @@ void UserConfigBackendKrb5::_connect() {
const_cast<char*>(KADM5_ADMIN_SERVICE), &params, KADM5_STRUCT_VERSION, KADM5_API_VERSION_2, 0, &handle);
if(err) {
- application->logf(Core::Logger::LOG_USER, Core::Logger::LOG_ERROR, "kadm5_init_with_password: %s", krb5_get_error_message(context, err));
+ application->log(Core::Logger::LOG_USER, Core::Logger::LOG_ERROR, Core::Format("kadm5_init_with_password: %1%") % krb5_get_error_message(context, err));
return;
}
}
@@ -84,7 +84,7 @@ void UserConfigBackendKrb5::_connect() {
const_cast<char*>(KADM5_ADMIN_SERVICE), &params, KADM5_STRUCT_VERSION, KADM5_API_VERSION_2, 0, &handle);
if(err) {
- application->logf(Core::Logger::LOG_USER, Core::Logger::LOG_ERROR, "kadm5_init_with_skey: %s", krb5_get_error_message(context, err));
+ application->log(Core::Logger::LOG_USER, Core::Logger::LOG_ERROR, Core::Format("kadm5_init_with_skey: %1%") % krb5_get_error_message(context, err));
return;
}
}
@@ -226,7 +226,7 @@ void UserConfigBackendKrb5::deleteUser(const Common::UserInfo &userInfo) throw(C
krb5_free_principal(context, princ);
if(err)
- application->logf(Core::Logger::LOG_USER, Core::Logger::LOG_WARNING, "kadm5_delete_principal: %s", krb5_get_error_message(context, err));
+ application->log(Core::Logger::LOG_USER, Core::Logger::LOG_WARNING, Core::Format("kadm5_delete_principal: %1%") % krb5_get_error_message(context, err));
}
void UserConfigBackendKrb5::setPassword(const Common::UserInfo &userInfo, const Core::String &password) throw(Core::Exception) {
diff --git a/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.h b/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.h
index 64f8501..c02f868 100644
--- a/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.h
+++ b/src/modules/UserConfigBackendKrb5/UserConfigBackendKrb5.h
@@ -64,7 +64,7 @@ class UserConfigBackendKrb5 : public Common::UserConfigBackend, private Core::Co
UserConfigBackendKrb5(Common::Application *application0) : application(application0), handle(0) {
krb5_error_code err = krb5_init_context(&context);
if(err) {
- application->logf("Unable to initialize kerberos context: %s", std::strerror(err));
+ application->log(Core::Format("Unable to initialize kerberos context: %1%") % std::strerror(err));
context = 0;
return;
}