|Summary:||ASTERISK-05965: [patch] Add "if (option_debug)" in front of LOG_DEBUG logging|
|Reporter:||Olle Johansson (oej)||Labels:|
|Date Opened:||2006-01-03 15:40:09.000-0600||Date Closed:||2006-02-13 16:42:58.000-0600|
|Environment:||Attachments:||( 0) optiondebug.txt|
|Description:||This patch adds check of option_debug in front of logging to LOG_DEBUG to avoid parsing of arguments if debugging is not turned on.|
Also changes some whitespace and formatting surronding the logging.
|Comments:||By: Clod Patry (junky) 2006-01-08 10:46:26.000-0600|
I like the idea here.
good job oej.
By: Mark Spencer (markster) 2006-01-08 12:49:20.000-0600
I generally feel like there are some debug messages that are valuable even in the absense of option_debug being turned on. Further, the parsing of arguments does not take place if LOG_DEBUG and/or verbose is not enabled *somewhere* (see logger.c, ast_log)...
By: Jason Parker (jparker) 2006-01-08 15:44:02.000-0600
Very minor formatting issue in hunk 5 (you missed a tab on the second part of the statement on the next line), and I noticed you used if(option_debug) in some places, and if(option_debug > 1) in others. Other than that, it looks fine to me..
By: Olle Johansson (oej) 2006-01-09 00:58:35.000-0600
markster: Debug messages that are useful outside of debugging should not be debugging messages but LOG_NOTICE, right?
north: Yes, I've moved some messages to debug level 2 or higher.
kpfleming has to give feedback on the parsing of arguments, since he's the one that told me to add option_debug in the first place. (Advanced ducking).
By: Matt O'Gorman (mogorman) 2006-01-09 17:52:36.000-0600
marko commit or scrap this?
By: Kevin P. Fleming (kpfleming) 2006-02-13 16:42:56.000-0600
The ast_log function already essentially does exactly this, except it allows LOG_DEBUG messages through when the 'verbose' setting is non-zero. It also returns quickly enough to not bother parsing the arguments.