mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-01 14:21:37 +00:00
more log adjustments
This commit is contained in:
@@ -55,7 +55,7 @@ void DatabaseUpdate::CheckDbUpdates()
|
||||
}
|
||||
|
||||
if (UpdateManifest(manifest_entries, v.server_database_version, b.server_database_version)) {
|
||||
LogInfo(
|
||||
LogInfoNoFn(
|
||||
"Updates ran successfully, setting database version to [{}] from [{}]",
|
||||
b.server_database_version,
|
||||
v.server_database_version
|
||||
@@ -64,7 +64,7 @@ void DatabaseUpdate::CheckDbUpdates()
|
||||
}
|
||||
|
||||
if (UpdateManifest(manifest_entries_custom, v.custom_database_version, b.custom_database_version)) {
|
||||
LogInfo(
|
||||
LogInfoNoFn(
|
||||
"Updates ran successfully, setting database version to [{}] from [{}]",
|
||||
b.custom_database_version,
|
||||
v.custom_database_version
|
||||
@@ -337,9 +337,9 @@ DatabaseUpdate *DatabaseUpdate::SetSkipBackup(bool skip)
|
||||
|
||||
bool DatabaseUpdate::CheckVersionsUpToDate(DatabaseVersion v, DatabaseVersion b)
|
||||
{
|
||||
LogInfo("{}", Strings::Repeat("-", BREAK_LENGTH));
|
||||
LogInfoNoFn("{}", Strings::Repeat("-", BREAK_LENGTH));
|
||||
|
||||
LogInfo(
|
||||
LogInfoNoFn(
|
||||
"{:>8} | database [{}] binary [{}] {}",
|
||||
"Server",
|
||||
v.server_database_version,
|
||||
@@ -348,7 +348,7 @@ bool DatabaseUpdate::CheckVersionsUpToDate(DatabaseVersion v, DatabaseVersion b)
|
||||
);
|
||||
|
||||
if (RuleB(Bots, Enabled) && b.bots_database_version > 0) {
|
||||
LogInfo(
|
||||
LogInfoNoFn(
|
||||
"{:>8} | database [{}] binary [{}] {}",
|
||||
"Bots",
|
||||
v.bots_database_version,
|
||||
@@ -358,7 +358,7 @@ bool DatabaseUpdate::CheckVersionsUpToDate(DatabaseVersion v, DatabaseVersion b)
|
||||
}
|
||||
|
||||
if (b.custom_database_version > 0) {
|
||||
LogInfo(
|
||||
LogInfoNoFn(
|
||||
"{:>8} | database [{}] binary [{}] {}",
|
||||
"Custom",
|
||||
v.custom_database_version,
|
||||
@@ -367,9 +367,9 @@ bool DatabaseUpdate::CheckVersionsUpToDate(DatabaseVersion v, DatabaseVersion b)
|
||||
);
|
||||
}
|
||||
|
||||
LogInfo("{:>8} | [server.auto_database_updates] [<green>true]", "Config");
|
||||
LogInfoNoFn("{:>8} | [server.auto_database_updates] [<green>true]", "Config");
|
||||
|
||||
LogInfo("{}", Strings::Repeat("-", BREAK_LENGTH));
|
||||
LogInfoNoFn("{}", Strings::Repeat("-", BREAK_LENGTH));
|
||||
|
||||
// server database version is required
|
||||
bool server_up_to_date = v.server_database_version >= b.server_database_version;
|
||||
|
||||
@@ -317,7 +317,10 @@ void EQEmuLogSys::ProcessConsoleMessage(
|
||||
}
|
||||
}
|
||||
|
||||
out << rang::fgB::black << "#" << func << " ";
|
||||
// check if func is not empty
|
||||
if (func && *func) {
|
||||
out << rang::fgB::black << "#" << func << " ";
|
||||
}
|
||||
|
||||
if (!origination_info.zone_short_name.empty()) {
|
||||
out << rang::fgB::black << "-- "
|
||||
|
||||
@@ -449,6 +449,11 @@ inline auto logsys = EQEmuLogSys::Instance();
|
||||
OutF(logsys, Logs::General, Logs::Info, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogInfoNoFn(message, ...) do {\
|
||||
if (logsys->IsLogEnabled(Logs::General, Logs::Info))\
|
||||
OutF(logsys, Logs::General, Logs::Info, "", "", 0, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogInfoDetail(message, ...) do {\
|
||||
if (logsys->IsLogEnabled(Logs::Detail, Logs::Info))\
|
||||
OutF(logsys, Logs::Detail, Logs::Info, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
@@ -459,6 +464,11 @@ inline auto logsys = EQEmuLogSys::Instance();
|
||||
OutF(logsys, Logs::General, Logs::Warning, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogWarningNoFn(message, ...) do {\
|
||||
if (logsys->IsLogEnabled(Logs::General, Logs::Info))\
|
||||
OutF(logsys, Logs::General, Logs::Warning, "", "", 0, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogWarningDetail(message, ...) do {\
|
||||
if (logsys->IsLogEnabled(Logs::Detail, Logs::Warning))\
|
||||
OutF(logsys, Logs::Detail, Logs::Warning, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
|
||||
@@ -87,16 +87,16 @@ void PathManager::Init()
|
||||
constexpr int break_length = 70;
|
||||
|
||||
LogInfo("Loading server paths");
|
||||
LogInfo("{}", Strings::Repeat("-", break_length));
|
||||
LogInfoNoFn("{}", Strings::Repeat("-", break_length));
|
||||
for (const auto& [name, in_path] : paths) {
|
||||
if (!in_path.empty()) {
|
||||
LogInfo("{:>{}} > [{:<{}}]", name, name_width, in_path, path_width);
|
||||
LogInfoNoFn("{:>{}} > {:<{}}", name, name_width, in_path, path_width);
|
||||
}
|
||||
}
|
||||
|
||||
auto log_paths = [&](const std::string& label, const std::vector<std::string>& paths) {
|
||||
if (!paths.empty()) {
|
||||
LogInfo("{:>{}} > [{:<{}}]", label, name_width - 1, Strings::Join(paths, ";"), path_width);
|
||||
LogInfoNoFn("{:>{}} > {:<{}}", label, name_width, Strings::Join(paths, ";"), path_width);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -104,7 +104,7 @@ void PathManager::Init()
|
||||
log_paths("plugins", m_plugin_paths);
|
||||
log_paths("lua_modules", m_lua_module_paths);
|
||||
|
||||
LogInfo("{}", Strings::Repeat("-", break_length));
|
||||
LogInfoNoFn("{}", Strings::Repeat("-", break_length));
|
||||
}
|
||||
|
||||
const std::string &PathManager::GetServerPath() const
|
||||
|
||||
Reference in New Issue
Block a user