From 3f26dd6be98eca05d429693fe54eb38713af72ff Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Wed, 22 Jun 2022 12:39:44 +0200 Subject: Let user change log level while running `/log level INFO|DEBUG|WARN|ERROR` is now available. Looks like this solves a TODO (see removed comment in source) from 2013 :-) Works only with default log file. Not with user provided log file during start up via the -f parameter. Fix https://github.com/profanity-im/profanity/issues/1627 --- src/command/cmd_defs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/command/cmd_defs.c') diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c index 2eaec284..8c8143fe 100644 --- a/src/command/cmd_defs.c +++ b/src/command/cmd_defs.c @@ -1884,14 +1884,16 @@ static struct cmd_t command_defs[] = { "/log where", "/log rotate on|off", "/log maxsize ", - "/log shared on|off") + "/log shared on|off", + "/log level INFO|DEBUG|WARN|ERROR") CMD_DESC( "Manage profanity log settings.") CMD_ARGS( { "where", "Show the current log file location." }, { "rotate on|off", "Rotate log, default on. Does not take effect if you specified a filename yourself when starting Profanity." }, { "maxsize ", "With rotate enabled, specifies the max log size, defaults to 1048580 (1MB)." }, - { "shared on|off", "Share logs between all instances, default: on. When off, the process id will be included in the log filename. Does not take effect if you specified a filename yourself when starting Profanity." }) + { "shared on|off", "Share logs between all instances, default: on. When off, the process id will be included in the log filename. Does not take effect if you specified a filename yourself when starting Profanity." }, + {"level INFO|DEBUG|WARN|EFFOR", "Set the log level. Default is INFO. Only works with default log file, not with user provided log file during startup via -f." }) CMD_NOEXAMPLES }, -- cgit 1.4.1-2-gfad0