[asterisk-dev] ast_debug() vs ast_log(LOG_DEBUG, ...) vs ast_log(AST_LOG_DEBUG, ...)

Russell Bryant russell at digium.com
Mon Jan 3 11:07:19 CST 2011


On Wed, 2010-12-22 at 10:25 -0800, Kirill Katsnelson wrote:
> There are 190 invocations of ast_log(LOG_DEBUG,...) on the current trunk 
> head, and about 3000 of ast_debug(). Are these 190 not gated by debug 
> level on purpose?
> 
> I am asking because 1.8 outputs 2 debug lines, want it or not, per every 
> call. It was a nice feature in 1.6 to be able to enable or disable debug 
> on the fly in 1.6 by just setting "core set debug N" instead of changing 
> and reloading logger.conf.
> 
> If that was not done on purpose, it would be nice to see that fixed. 
> Those 2 printed out of 6 calls to ast_log() in 
> ast_set_owners_and_peers() are killing me. I can upload a patch for 
> these 6, but thought it might be ideal to get it fixed en masse in all 
> 200 places -- assuming this is not currently right.

I can't think of any reason ast_log(LOG_DEBUG, ...) should be used
directly.  They should all be converted to ast_debug().

-- 
Russell Bryant
Digium, Inc.  |  Engineering Manager, Open Source Software
445 Jan Davis Drive NW   -    Huntsville, AL 35806  -  USA
jabber: rbryant at digium.com    -=-    skype: russell-bryant
www.digium.com -=- www.asterisk.org -=- blogs.asterisk.org





More information about the asterisk-dev mailing list