[asterisk-bugs] [Asterisk 0010891]: [patch] Add support for setting log levels on remote console
noreply at bugs.digium.com
noreply at bugs.digium.com
Tue Nov 13 14:58:38 CST 2007
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=10891
======================================================================
Reported By: jamesgolovich
Assigned To: russell
======================================================================
Project: Asterisk
Issue ID: 10891
Category: Core-General
Reproducibility: N/A
Severity: feature
Priority: normal
Status: assigned
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 10-04-2007 18:29 CDT
Last Modified: 11-13-2007 14:58 CST
======================================================================
Summary: [patch] Add support for setting log levels on remote
console
Description:
Since there was some interest in being able to enable certain log levels on
different remote consoles I threw together this proof of concept patch.
There isn't really any error checking and more work needs to be done, but I
thought I would throw it out there for comments.
It adds the cli command "logger set level <level> <state>" that you
execute on a channel you want to change state on. level is the numeric
logger level 0-6:
0 "DEBUG",
1 "EVENT",
2 "NOTICE",
3 "WARNING",
4 "ERROR",
5 "VERBOSE",
6 "DTMF"
<state> is on or off
This could be extended to include a command line option for what to
include or maybe even a profile or something. Obviously this would need to
have a way to use the real names instead of numbers, but it works for now
======================================================================
----------------------------------------------------------------------
jamesgolovich - 11-13-07 14:58
----------------------------------------------------------------------
The code in handle_set_logger_level does it
+ for (x = 0; x <= NUMLOGLEVELS; x++) {
+ if (!strcasecmp(a->argv[3], levels[x])) {
+ level = x;
+ break;
+ }
+ }
I'm still not sure what the best way to allow levels to be set from the
command line is. Maybe a comma delimited list or using the same argument
multiple times to enable/disable each one.
Issue History
Date Modified Username Field Change
======================================================================
11-13-07 14:58 jamesgolovich Note Added: 0073594
======================================================================
More information about the asterisk-bugs
mailing list