Index: main/logger.c =================================================================== --- main/logger.c (revision 292862) +++ main/logger.c (working copy) @@ -1256,11 +1256,13 @@ void __ast_verbose_ap(const char *file, int line, const char *func, const char *fmt, va_list ap) { + struct logmsg *logmsg = NULL; struct ast_str *buf = NULL; int res = 0; - if (!(buf = ast_str_thread_get(&verbose_buf, VERBOSE_BUF_INIT_SIZE))) + if (!(buf = ast_str_thread_get(&verbose_buf, VERBOSE_BUF_INIT_SIZE))) { return; + } if (ast_opt_timestamp) { struct timeval now; @@ -1284,10 +1286,21 @@ res = ast_str_set_va(&buf, 0, fmt, ap); /* If the build failed then we can drop this allocated message */ - if (res == AST_DYNSTR_BUILD_FAILED) + if (res == AST_DYNSTR_BUILD_FAILED) { return; + } - ast_log(__LOG_VERBOSE, file, line, func, "%s", ast_str_buffer(buf)); + if (!(logmsg = ast_calloc_with_stringfields(1, struct logmsg, res + 128))) { + return; + } + + ast_string_field_set(logmsg, message, ast_str_buffer(buf)); + ast_log(__LOG_VERBOSE, file, line, func, "%s", logmsg->message + 1); + + /* Set type */ + logmsg->level = __LOG_VERBOSE; + logger_print_normal(logmsg); + ast_free(logmsg); } void __ast_verbose(const char *file, int line, const char *func, const char *fmt, ...)