mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
*Add new console command "server set logfilelevel".
--HG-- branch : trunk
This commit is contained in:
@@ -524,6 +524,7 @@ ChatCommand * ChatHandler::getCommandTable()
|
||||
{
|
||||
{ "difftime", SEC_CONSOLE, true, &ChatHandler::HandleServerSetDiffTimeCommand, "", NULL },
|
||||
{ "loglevel", SEC_CONSOLE, true, &ChatHandler::HandleServerSetLogLevelCommand, "", NULL },
|
||||
{ "logfilelevel", SEC_CONSOLE, true, &ChatHandler::HandleServerSetLogFileLevelCommand, "", NULL },
|
||||
{ "motd", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerSetMotdCommand, "", NULL },
|
||||
{ "closed", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerSetClosedCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
|
||||
@@ -394,6 +394,7 @@ class ChatHandler
|
||||
bool HandleServerRestartCommand(const char* args);
|
||||
bool HandleServerSetMotdCommand(const char* args);
|
||||
bool HandleServerSetLogLevelCommand(const char* args);
|
||||
bool HandleServerSetLogFileLevelCommand(const char* args);
|
||||
bool HandleServerSetDiffTimeCommand(const char* args);
|
||||
bool HandleServerShutDownCommand(const char* args);
|
||||
bool HandleServerShutDownCancelCommand(const char* args);
|
||||
|
||||
@@ -252,6 +252,20 @@ bool ChatHandler::HandleAccountCreateCommand(const char* args)
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Set the level of logging
|
||||
bool ChatHandler::HandleServerSetLogFileLevelCommand(const char *args)
|
||||
{
|
||||
if(!*args)
|
||||
return false;
|
||||
|
||||
char *NewLevel = strtok((char*)args, " ");
|
||||
if (!NewLevel)
|
||||
return false;
|
||||
|
||||
sLog.SetLogFileLevel(NewLevel);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Set the level of logging
|
||||
bool ChatHandler::HandleServerSetLogLevelCommand(const char *args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user