diff --git a/zone/command.cpp b/zone/command.cpp index 67d8a1f38..7b33b46c0 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -10418,10 +10418,33 @@ void command_crashtest(Client *c, const Seperator *sep) } void command_logs(Client *c, const Seperator *sep){ + int logs_set = 0; if (sep->argnum > 0) { if(strcasecmp(sep->arg[1], "reload_all") == 0){ c->Message(0, "Yes this is working"); } + if (strcasecmp(sep->arg[1], "set") == 0){ + if (strcasecmp(sep->arg[4], "log_to_console") == 0){ + Log.log_settings[atoi(sep->arg[2])].log_to_console = atoi(sep->arg[3]); + logs_set = 1; + } + else if (strcasecmp(sep->arg[4], "log_to_file") == 0){ + Log.log_settings[atoi(sep->arg[2])].log_to_file = atoi(sep->arg[3]); + logs_set = 1; + } + else if (strcasecmp(sep->arg[4], "log_to_gmsay") == 0){ + Log.log_settings[atoi(sep->arg[2])].log_to_gmsay = atoi(sep->arg[3]); + logs_set = 1; + } + else{ + c->Message(0, "--- #logs set - Sets in memory the log settings, if you want settings to be permanent, edit your 'logsys_categories' table"); + c->Message(0, "--- #logs set 20 1 log_to_gmsay - Would output Quest errors to gmsay"); + } + if (logs_set == 1){ + c->Message(15, "Your Log Settings have been applied"); + c->Message(15, "%s :: Debug Level: %i - Category: %s", sep->arg[4], atoi(sep->arg[3]), Logs::LogCategoryName[atoi(sep->arg[2])]); + } + } if (strcasecmp(sep->arg[1], "list_settings") == 0){ c->Message(0, "[Category ID | log_to_console | log_to_file | log_to_gmsay | Category Description]"); int redisplay_columns = 0; diff --git a/zone/command.h b/zone/command.h index 2e15788cd..dbbd7e770 100644 --- a/zone/command.h +++ b/zone/command.h @@ -323,7 +323,7 @@ void command_merchantopenshop(Client *c, const Seperator *sep); void command_merchantcloseshop(Client *c, const Seperator *sep); void command_shownumhits(Client *c, const Seperator *sep); void command_logtest(Client *c, const Seperator *sep); -void command_log(Client *c, const Seperator *sep); +void command_logs(Client *c, const Seperator *sep); #ifdef EQPROFILE void command_profiledump(Client *c, const Seperator *sep);