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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user