Update eqemu_logsys.cpp

This commit is contained in:
Akkadius 2024-10-08 07:25:08 -05:00
parent d9e6665bd3
commit 108a7013db

View File

@ -274,6 +274,7 @@ void EQEmuLogSys::ProcessConsoleMessage(
} }
} }
msg = Strings::Replace(msg, " ", " ");
msg = Strings::Trim(msg); msg = Strings::Trim(msg);
} }
@ -561,7 +562,7 @@ void EQEmuLogSys::StartFileLogs(const std::string &log_name)
return; return;
} }
LogInfo("Starting File Log [{}/zone/{}_{}.log]", GetLogPath(), m_platform_file_name.c_str(), getpid()); LogInfo("Starting File Log [GetLogPath|{}/zone/{}_{}.log]", GetLogPath(), m_platform_file_name.c_str(), getpid());
// Make directory if not exists // Make directory if not exists
EQEmuLogSys::MakeDirectory(fmt::format("{}/zone", GetLogPath())); EQEmuLogSys::MakeDirectory(fmt::format("{}/zone", GetLogPath()));
@ -579,7 +580,7 @@ void EQEmuLogSys::StartFileLogs(const std::string &log_name)
return; return;
} }
LogInfo("Starting File Log [{}/{}_{}.log]", GetLogPath(), m_platform_file_name.c_str(), getpid()); LogInfo("Starting File Log [GetLogPath|{}/{}_{}.log]", GetLogPath(), m_platform_file_name.c_str(), getpid());
// Open file pointer // Open file pointer
process_log.open( process_log.open(
@ -697,14 +698,14 @@ EQEmuLogSys *EQEmuLogSys::LoadLogDatabaseSettings()
return this; return this;
} }
LogInfo("Loaded [{}] log categories", categories.size()); LogInfo("Loaded [categories.size|{}] log categories", categories.size());
auto webhooks = DiscordWebhooksRepository::GetWhere(*m_database, fmt::format("id < {}", MAX_DISCORD_WEBHOOK_ID)); auto webhooks = DiscordWebhooksRepository::GetWhere(*m_database, fmt::format("id < {}", MAX_DISCORD_WEBHOOK_ID));
if (!webhooks.empty()) { if (!webhooks.empty()) {
for (auto &w: webhooks) { for (auto &w: webhooks) {
m_discord_webhooks[w.id] = {w.id, w.webhook_name, w.webhook_url}; m_discord_webhooks[w.id] = {w.id, w.webhook_name, w.webhook_url};
} }
LogInfo("Loaded [{}] Discord webhooks", webhooks.size()); LogInfo("Loaded [webhooks.size|{}] Discord webhooks", webhooks.size());
} }
// force override this setting // force override this setting