aboutsummaryrefslogtreecommitdiffstats
path: root/main/logger.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-24 18:51:41 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-24 18:51:41 +0000
commit438cb82e0f7387fd29396ac0037c9c574f7dd114 (patch)
treea48442a34e74ae91b6f1a3c6a9ebef7d943024c1 /main/logger.c
parente645e3fc7bcc93bdd42d2296ed0709e72096c3b6 (diff)
Conversions to ast_debug()
(issue #9984, patches from eliel and dimas) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71338 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/logger.c')
-rw-r--r--main/logger.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/main/logger.c b/main/logger.c
index f02a18e50..5357f9503 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -964,16 +964,13 @@ void ast_backtrace(void)
if ((addresses = ast_calloc(MAX_BACKTRACE_FRAMES, sizeof(*addresses)))) {
count = backtrace(addresses, MAX_BACKTRACE_FRAMES);
if ((strings = backtrace_symbols(addresses, count))) {
- if (option_debug)
- ast_log(LOG_DEBUG, "Got %d backtrace record%c\n", count, count != 1 ? 's' : ' ');
+ ast_debug(1, "Got %d backtrace record%c\n", count, count != 1 ? 's' : ' ');
for (i=0; i < count ; i++) {
- if (option_debug)
- ast_log(LOG_DEBUG, "#%d: [%08X] %s\n", i, (unsigned int)addresses[i], strings[i]);
+ ast_debug(1, "#%d: [%08X] %s\n", i, (unsigned int)addresses[i], strings[i]);
}
free(strings);
} else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Could not allocate memory for backtrace\n");
+ ast_debug(1, "Could not allocate memory for backtrace\n");
}
free(addresses);
}