logger: allow to disable logging into the file

This commit is contained in:
jeefo 2023-06-04 22:19:08 +03:00
commit 5d94dec74c
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED

View file

@ -9,6 +9,7 @@
ConVar cv_bind_menu_key ("yb_bind_menu_key", "=", "Binds specified key for opening bots menu.", false);
ConVar cv_ignore_cvars_on_changelevel ("yb_ignore_cvars_on_changelevel", "yb_quota,yb_autovacate", "Specifies comma separated list of bot cvars, that will not be overwritten by config on changelevel.", false);
ConVar cv_logger_disable_logfile ("yb_logger_disable_logfile", "0", "Disables logger to write anything to log file. Just spew content to the console.");
BotConfig::BotConfig () {
m_chat.resize (Chat::Count);
@ -108,6 +109,9 @@ void BotConfig::loadMainConfig (bool isFirstLoad) {
if (!game.isDedicated () && !strings.isEmpty (cv_bind_menu_key.str ())) {
game.serverCommand ("bind \"%s\" \"yb menu\"", cv_bind_menu_key.str ());
}
// disable logger if requested
logger.disableLogWrite (cv_logger_disable_logfile.bool_ ());
}
void BotConfig::loadNamesConfig () {