aboutsummaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-01-18 03:30:22 +0000
committerGravatar Sadie Powell2022-05-01 22:07:14 +0100
commite23ee3fde17a6bb17a9e56c7105f4bbceb36391f (patch)
treeb5117aa2cc0fe2bee18df3a5dabf0ecc49dbd30e /src/configreader.cpp
parentRewrite the entire logging system. (diff)
Rewrite logging calls to use the new APIs.
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index d5b7364ef..f4061861e 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -471,7 +471,7 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
if (!valid)
{
- ServerInstance->Logs.Log("CONFIG", LOG_DEFAULT, "There were errors in your configuration file:");
+ ServerInstance->Logs.Normal("CONFIG", "There were errors in your configuration file:");
Classes.clear();
}
@@ -589,7 +589,7 @@ std::shared_ptr<ConfigTag> ServerConfig::ConfValue(const std::string& tag, std::
if (tags.count() > 1)
{
- ServerInstance->Logs.Log("CONFIG", LOG_DEFAULT, "Multiple (%zu) <%s> tags found; only the first will be used (first at %s, last at %s)",
+ ServerInstance->Logs.Normal("CONFIG", "Multiple (%zu) <%s> tags found; only the first will be used (first at %s, last at %s)",
tags.count(), tag.c_str(), tags.begin()->second->source.str().c_str(), std::prev(tags.end())->second->source.str().c_str());
}
return tags.begin()->second;
@@ -633,7 +633,7 @@ void ConfigReaderThread::OnStart()
void ConfigReaderThread::OnStop()
{
ServerConfig* old = ServerInstance->Config;
- ServerInstance->Logs.Log("CONFIG", LOG_DEBUG, "Switching to new configuration...");
+ ServerInstance->Logs.Debug("CONFIG", "Switching to new configuration...");
ServerInstance->Config = this->Config;
Config->Apply(old, UUID);
@@ -656,12 +656,12 @@ void ConfigReaderThread::OnStop()
{
try
{
- ServerInstance->Logs.Log("MODULE", LOG_DEBUG, "Rehashing " + modname);
+ ServerInstance->Logs.Debug("MODULE", "Rehashing " + modname);
mod->ReadConfig(status);
}
catch (CoreException& modex)
{
- ServerInstance->Logs.Log("MODULE", LOG_DEFAULT, "Exception caught: " + modex.GetReason());
+ ServerInstance->Logs.Normal("MODULE", "Exception caught: " + modex.GetReason());
if (user)
user->WriteNotice(modname + ": " + modex.GetReason());
}