Improved logging system.

Made generic flags for log event types.
Made support for module filtering. Note: Manager for module filtering is not implemented. Don't enable filter when testing, otherwise nothing will be logged.
Updated all log events.
This commit is contained in:
richard
2009-06-01 23:29:26 +02:00
parent db866c6f43
commit 4ce30ac002
18 changed files with 317 additions and 141 deletions

View File

@ -201,7 +201,7 @@ ConfigLoad()
ServerCommand("exec %s", mapconfig);
// Log action.
LogPrintToLog(LOG_FORMAT_TYPE_NORMAL, "Config", "Map Configs", "Executed map config file: %s", path);
LogEvent(false, LogType_Normal, LOG_CORE_EVENTS, LogModule_Config, "Map Configs", "Executed map config file: %s", path);
}
/**
@ -239,7 +239,7 @@ ConfigOnModulesLoaded()
ServerCommand("exec %s", mapconfig);
// Log action.
LogPrintToLog(LOG_FORMAT_TYPE_NORMAL, "Config", "Map Configs", "Executed post map config file: %s", path);
LogEvent(false, LogType_Normal, LOG_CORE_EVENTS, LogModule_Config, "Executed post map config file: %s", path);
}
/**
@ -552,7 +552,7 @@ stock bool:ConfigReloadConfig(ConfigFile:config)
ConfigGetConfigAlias(config, configalias, sizeof(configalias));
// Print reload failure to logs.
LogPrintToLog(LOG_FORMAT_TYPE_ERROR, "Config", "Reload Function", "Invalid reload function for config: \"%s\"", configalias);
LogEvent(false, LogType_Error, LOG_CORE_EVENTS, LogModule_Config, "Reload Function", "Invalid reload function for config: \"%s\"", configalias);
return true;
}