[asterisk-dev] (((Getting debug level)))

Dmitry Andrianov dimas at dataart.com
Mon Jan 28 11:46:50 CST 2008

Just use ast_debug(LEVEL, ...) instead of ast_log(LOG_DEBUG, ...) and it will check debug level automatically.
This however applies only to trunk / 1.6 - if you are using 1.4, you have to do
if (option_debug) {
        ast_log(LOG_DEBUG, ...)


if (option_debug > LEVEL) {
        ast_log(LOG_DEBUG, ...)

-----Original Message-----
From: asterisk-dev-bounces at lists.digium.com [mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Ed Greenberg
Sent: Monday, January 28, 2008 8:33 PM
To: asterisk-dev at lists.digium.com
Subject: [asterisk-dev] (((Getting debug level)))

I am getting debug lines on the console from res_config_mysql.c even
with core set debug 0 or off.

I would like to craft a patch to check the debug level before outputting
these lines.

I've been trying to find an example in the source of how this is
determined with little success.

Can somebody please point me at documentation or examples on how
debugging output is controlled?

Ed Greenberg
San Jose, CA

--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:

More information about the asterisk-dev mailing list