summaryrefslogtreecommitdiffstats
path: root/src/Common
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/ModuleManager.cpp6
-rw-r--r--src/Common/UserManager.cpp16
2 files changed, 11 insertions, 11 deletions
diff --git a/src/Common/ModuleManager.cpp b/src/Common/ModuleManager.cpp
index c119eab..0347971 100644
--- a/src/Common/ModuleManager.cpp
+++ b/src/Common/ModuleManager.cpp
@@ -62,7 +62,7 @@ void ModuleManager::configure() {
std::vector<const Core::ConfigEntry*> entries = application->getConfigManager()->getEntries("LoadModule");
for(std::vector<const Core::ConfigEntry*>::iterator entry = entries.begin(); entry != entries.end(); ++entry) {
if(!loadModule((*entry)->getValue().toLocale()))
- application->logf(Core::Logger::LOG_ERROR, "Can't load module '%s'.", (*entry)->getValue().toLocale().c_str());
+ application->log(Core::Logger::LOG_ERROR, Core::Format("Can't load module '%1%'.") % (*entry)->getValue());
}
}
@@ -88,9 +88,9 @@ bool ModuleManager::loadModule(const std::string &name) {
if(!handle) {
#ifdef WIN32
- application->logf(Core::Logger::LOG_VERBOSE, "loadModule: Can't open module: Error %u", GetLastError());
+ application->log(Core::Logger::LOG_VERBOSE, Core::Format("loadModule: Can't open module: Error %1%") % GetLastError());
#else
- application->logf(Core::Logger::LOG_VERBOSE, "loadModule: Can't open module: %s", dlerror());
+ application->log(Core::Logger::LOG_VERBOSE, Core::Format("loadModule: Can't open module: %1%") % dlerror());
#endif
return false;
}
diff --git a/src/Common/UserManager.cpp b/src/Common/UserManager.cpp
index e71c38e..917c61a 100644
--- a/src/Common/UserManager.cpp
+++ b/src/Common/UserManager.cpp
@@ -39,29 +39,29 @@ UserManager::~UserManager() {
void UserManager::configure() {
minUid = std::strtoul(application->getConfigManager()->get("UserManager.MinUid", "1000").toString().c_str(), 0, 10);
if(minUid == 0) {
- application->logf(Core::Logger::LOG_WARNING, "UserBackendHome: Invalid configuration: MinUid '%s'",
- application->getConfigManager()->get("UserManager.MinUid").toLocale().c_str());
+ application->log(Core::Logger::LOG_WARNING, Core::Format("UserBackendHome: Invalid configuration: MinUid '%1%'")
+ % application->getConfigManager()->get("UserManager.MinUid"));
minUid = 1000;
}
maxUid = std::strtoul(application->getConfigManager()->get("UserManager.MaxUid", "29999").toString().c_str(), 0, 10);
if(maxUid == 0) {
- application->logf(Core::Logger::LOG_WARNING, "UserBackendHome: Invalid configuration: MaxUid '%s'",
- application->getConfigManager()->get("UserManager.MaxUid").toLocale().c_str());
+ application->log(Core::Logger::LOG_WARNING, Core::Format("UserBackendHome: Invalid configuration: MaxUid '%1%'")
+ % application->getConfigManager()->get("UserManager.MaxUid"));
maxUid = 29999;
}
minGid = std::strtoul(application->getConfigManager()->get("UserManager.MinGid", "1000").toString().c_str(), 0, 10);
if(minGid == 0) {
- application->logf(Core::Logger::LOG_WARNING, "UserBackendHome: Invalid configuration: MinGid '%s'",
- application->getConfigManager()->get("UserManager.MinGid").toLocale().c_str());
+ application->log(Core::Logger::LOG_WARNING, Core::Format("UserBackendHome: Invalid configuration: MinGid '%1%'")
+ % application->getConfigManager()->get("UserManager.MinGid"));
minGid = 1000;
}
maxGid = std::strtoul(application->getConfigManager()->get("UserManager.MaxGid", "29999").toString().c_str(), 0, 10);
if(maxGid == 0) {
- application->logf(Core::Logger::LOG_WARNING, "UserBackendHome: Invalid configuration: MaxGid '%s'",
- application->getConfigManager()->get("UserManager.MaxGid").toLocale().c_str());
+ application->log(Core::Logger::LOG_WARNING, Core::Format("UserBackendHome: Invalid configuration: MaxGid '%1%'")
+ % application->getConfigManager()->get("UserManager.MaxGid"));
maxGid = 29999;
}
}