From 99a0012bddd37f0908e043a1fc14855cb0f1b054 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 13 Jan 2015 15:13:12 -0600 Subject: [PATCH] Removal of rule based settings, moving to separate DB table --- common/eqemu_logsys.cpp | 14 -------------- common/ruletypes.h | 12 ------------ 2 files changed, 26 deletions(-) diff --git a/common/eqemu_logsys.cpp b/common/eqemu_logsys.cpp index 2dd2aed14..cfd7ab372 100644 --- a/common/eqemu_logsys.cpp +++ b/common/eqemu_logsys.cpp @@ -19,7 +19,6 @@ #include "eqemu_logsys.h" #include "string_util.h" -#include "rulesys.h" #include "platform.h" #include @@ -146,7 +145,6 @@ std::string EQEmuLogSys::FormatDebugCategoryMessageString(uint16 log_category, s void EQEmuLogSys::LogDebugType(DebugLevel debug_level, uint16 log_category, std::string message, ...) { - if (RuleI(Logging, DebugLogLevel) < debug_level){ return; } va_list args; va_start(args, message); @@ -180,8 +178,6 @@ void EQEmuLogSys::ProcessLogWrite(uint16 log_type, std::string message){ void EQEmuLogSys::LogDebug(DebugLevel debug_level, std::string message, ...) { - if (RuleI(Logging, DebugLogLevel) < debug_level){ return; } - va_list args; va_start(args, message); std::string output_message = vStringFormat(message.c_str(), args); @@ -210,15 +206,9 @@ void EQEmuLogSys::MakeDirectory(std::string directory_name){ void EQEmuLogSys::Log(uint16 log_type, const std::string message, ...) { - if (log_type > EQEmuLogSys::MaxLogID){ return; } - if (!RuleB(Logging, LogFileCommands) && log_type == EQEmuLogSys::LogType::Commands){ return; } - - if (!RuleB(Logging, EnableFileLogging)){ - return; - } va_list args; va_start(args, message); @@ -235,10 +225,6 @@ void EQEmuLogSys::ConsoleMessage(uint16 log_type, const std::string message) if (log_type > EQEmuLogSys::MaxLogID){ return; } - if (!RuleB(Logging, EnableConsoleLogging)){ - return; - } - if (!RuleB(Logging, ConsoleLogCommands) && log_type == EQEmuLogSys::LogType::Commands){ return; } #ifdef _WINDOWS HANDLE console_handle; diff --git a/common/ruletypes.h b/common/ruletypes.h index c16590783..ad04cdbff 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -596,18 +596,6 @@ RULE_CATEGORY( Client ) RULE_BOOL( Client, UseLiveFactionMessage, false) // Allows players to see faction adjustments like Live RULE_CATEGORY_END() -RULE_CATEGORY(Logging) -RULE_BOOL(Logging, ConsoleLogCommands, false) /* Turns on or off console logs */ -RULE_BOOL(Logging, LogFileCommands, false) - -RULE_INT(Logging, DebugLogLevel, 0) /* Sets Debug Level, -1 = OFF, 0 = Low Level, 1 = Info, 2 = Extreme */ - -RULE_BOOL(Logging, EnableConsoleLogging, true) /* Turns on or off ALL logging to console */ -RULE_BOOL(Logging, EnableFileLogging, true) /* Turns on or off ALL forms of file logging */ - -RULE_CATEGORY_END() - - #undef RULE_CATEGORY #undef RULE_INT #undef RULE_REAL