aboutsummaryrefslogtreecommitdiff
path: root/src/common/Configuration/Config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Configuration/Config.cpp')
-rw-r--r--src/common/Configuration/Config.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp
index 3471c568491..baf5d5bf11c 100644
--- a/src/common/Configuration/Config.cpp
+++ b/src/common/Configuration/Config.cpp
@@ -227,25 +227,25 @@ T ConfigMgr::GetValueDefault(std::string const& name, T def, bool quiet) const
Optional<T> castedVar = Trinity::StringTo<T>(*envVar);
if (!castedVar)
{
- TC_LOG_ERROR("server.loading", "Bad value defined for name %s in environment variables, going to use default instead", name.c_str());
+ TC_LOG_ERROR("server.loading", "Bad value defined for name {} in environment variables, going to use default instead", name);
return def;
}
if (!quiet)
- TC_LOG_WARN("server.loading", "Missing name %s in config file %s, recovered with environment '%s' value.", name.c_str(), _filename.c_str(), envVar->c_str());
+ TC_LOG_WARN("server.loading", "Missing name {} in config file {}, recovered with environment '{}' value.", name, _filename, envVar->c_str());
return *castedVar;
}
else if (!quiet)
{
- TC_LOG_WARN("server.loading", "Missing name %s in config file %s, add \"%s = %s\" to this file",
- name.c_str(), _filename.c_str(), name.c_str(), std::to_string(def).c_str());
+ TC_LOG_WARN("server.loading", "Missing name {} in config file {}, add \"{} = {}\" to this file",
+ name, _filename, name, def);
}
}
catch (bpt::ptree_bad_data const&)
{
- TC_LOG_ERROR("server.loading", "Bad value defined for name %s in config file %s, going to use %s instead",
- name.c_str(), _filename.c_str(), std::to_string(def).c_str());
+ TC_LOG_ERROR("server.loading", "Bad value defined for name {} in config file {}, going to use {} instead",
+ name, _filename, def);
}
return def;
@@ -264,20 +264,20 @@ std::string ConfigMgr::GetValueDefault<std::string>(std::string const& name, std
if (envVar)
{
if (!quiet)
- TC_LOG_WARN("server.loading", "Missing name %s in config file %s, recovered with environment '%s' value.", name.c_str(), _filename.c_str(), envVar->c_str());
+ TC_LOG_WARN("server.loading", "Missing name {} in config file {}, recovered with environment '{}' value.", name, _filename, envVar->c_str());
return *envVar;
}
else if (!quiet)
{
- TC_LOG_WARN("server.loading", "Missing name %s in config file %s, add \"%s = %s\" to this file",
- name.c_str(), _filename.c_str(), name.c_str(), def.c_str());
+ TC_LOG_WARN("server.loading", "Missing name {} in config file {}, add \"{} = {}\" to this file",
+ name, _filename, name, def);
}
}
catch (bpt::ptree_bad_data const&)
{
- TC_LOG_ERROR("server.loading", "Bad value defined for name %s in config file %s, going to use %s instead",
- name.c_str(), _filename.c_str(), def.c_str());
+ TC_LOG_ERROR("server.loading", "Bad value defined for name {} in config file {}, going to use {} instead",
+ name, _filename, def);
}
return def;
@@ -299,8 +299,8 @@ bool ConfigMgr::GetBoolDefault(std::string const& name, bool def, bool quiet) co
return *boolVal;
else
{
- TC_LOG_ERROR("server.loading", "Bad value defined for name %s in config file %s, going to use '%s' instead",
- name.c_str(), _filename.c_str(), def ? "true" : "false");
+ TC_LOG_ERROR("server.loading", "Bad value defined for name {} in config file {}, going to use '{}' instead",
+ name, _filename, def ? "true" : "false");
return def;
}
}