|Summary:||ASTERISK-03483: [patch] Simple ast_log filter|
|Reporter:||Michael Giagnocavo (aginamu)||Labels:|
|Date Opened:||2005-02-11 01:29:39.000-0600||Date Closed:||2005-03-09 10:59:14.000-0600|
|Environment:||Attachments:||( 0) logger_filter.diff.txt|
|Description:||If you like running with lots of logging, but want to trim your output a bit, this simple filter might help. just add:|
filterout=value1\value2\value3... to your logger.conf.
I'm not convinced this is a good at all approach, but it seems to work for simple filtering. I guess filters for the filename would be a nice enhancement?
****** ADDITIONAL INFORMATION ******
Disclaimer on file.
|Comments:||By: Michael Giagnocavo (aginamu) 2005-02-11 01:38:05.000-0600|
Mavvie suggested making it a regular expression.
By: Olle Johansson (oej) 2005-02-11 03:08:06.000-0600
I don't know if it's a clever idea to do filtering in Asterisk. In Apache, I pipe the logging output to an external program that does filtering. Maybe that's a model?
Just brainstorming here, really.
By: Michael Giagnocavo (aginamu) 2005-02-11 09:37:23.000-0600
Hmm, an external program probably does make more sense. Except for the console. Maybe I should make it only apply to the console? (My issue is I'm monitoring stuff and get flooded with a thousand "raw hangup" lines from IAX2, or tons of warnings about mini frames.)
By: Olle Johansson (oej) 2005-02-11 09:58:26.000-0600
That makes sense to me - a filter in Asterisk for console *only* (Yes, I have those kind of logs on my screen daily...)
And a possibility to pipe to a pipe instead of a file in logger conf, like
mypipe = "|/usr/local/bin/mysuperawkscripthatdoesmiracles.awk"
mypipe = notice,debug,verbose
By: Mark Spencer (markster) 2005-02-13 01:31:00.000-0600
We can just fix the lines that are giving you trouble.
By: Michael Giagnocavo (aginamu) 2005-02-13 12:15:25.000-0600
Well, I suppose, but I run with DEBUG on, so I can see my program's debug output. IAX2 generates a lot of messages, the biggest ones being a DEBUG mesasge for "Raw hangup", and a WARNING for "Received mini frame before full voice frame", and they tend to flood the screen. I'll look into these; perhaps it can track if the message has been generated already, and not write anymore?
From talking with others, it seems like an include might be another option. That'd allow full debug messages, but specify which files to allow debug output for (useful when writing new apps and so on).
By: Mark Spencer (markster) 2005-02-28 00:31:12.000-0600
How about a CLI option:
debug file <filename>
That enables option_debug and masks out all DEBUG messages (whether from option_debug or not) except those matching filename?
By: Brian West (bkw918) 2005-03-09 01:58:08.000-0600
Mark says this is in CVS.