Core/Commands: Enable SQL query logging by config and command )patch by leak)
Closes issue 4853. --HG-- branch : trunk
This commit is contained in:
@@ -530,6 +530,18 @@ bool ChatHandler::HandleServerSetDiffTimeCommand(const char *args)
|
||||
return true;
|
||||
}
|
||||
|
||||
/// toggle sql driver query logging
|
||||
bool ChatHandler::HandleServerToggleQueryLogging(const char* /* args */)
|
||||
{
|
||||
sLog.SetSQLDriverQueryLogging(!sLog.GetSQLDriverQueryLogging());
|
||||
if(sLog.GetSQLDriverQueryLogging())
|
||||
PSendSysMessage(LANG_SQLDRIVER_QUERY_LOGGING_ENABLED);
|
||||
else
|
||||
PSendSysMessage(LANG_SQLDRIVER_QUERY_LOGGING_DISABLED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// @}
|
||||
|
||||
#ifdef linux
|
||||
|
||||
@@ -405,9 +405,14 @@ CleanCharacterDB = 0
|
||||
#
|
||||
# SQLDriverLogFile
|
||||
# Log file of SQL driver events.
|
||||
# For effective query logging you need to build in debug configuration.
|
||||
# For effective query logging you need to configure SQLDriverQueryLogging.
|
||||
# Default: "" - Empty name for disable
|
||||
#
|
||||
# SQLDriverQueryLogging
|
||||
# Log SQL queries to the SQLDriverLogFile and console
|
||||
# Default: 0 - disabled (Query errors only)
|
||||
# 1 - enabled (Full query logging - may have performance impact)
|
||||
#
|
||||
# LogColors
|
||||
# Color for messages (format "normal basic detail debug")
|
||||
# Default: "" - no colors
|
||||
@@ -538,6 +543,7 @@ RaLogFile = "ra_commands.log"
|
||||
ArenaLogFile = ""
|
||||
ArenaLog.ExtendedInfo = 0
|
||||
SQLDriverLogFile = ""
|
||||
SQLDriverQueryLogging = 0
|
||||
LogColors = ""
|
||||
EnableLogDB = 0
|
||||
DBLogLevel = 2
|
||||
|
||||
Reference in New Issue
Block a user