diff options
-rw-r--r-- | include/asterisk/logger.h | 6 | ||||
-rw-r--r-- | main/logger.c | 4 | ||||
-rw-r--r-- | utils/ael_main.c | 2 | ||||
-rw-r--r-- | utils/hashtest.c | 2 | ||||
-rw-r--r-- | utils/hashtest2.c | 2 | ||||
-rw-r--r-- | utils/refcounter.c | 2 |
6 files changed, 10 insertions, 8 deletions
diff --git a/include/asterisk/logger.h b/include/asterisk/logger.h index 9ed2dc922..4995c54c2 100644 --- a/include/asterisk/logger.h +++ b/include/asterisk/logger.h @@ -75,8 +75,10 @@ void ast_queue_log(const char *queuename, const char *callid, const char *agent, Note the abscence of a comma after the VERBOSE_PREFIX_3. This is important. VERBOSE_PREFIX_1 through VERBOSE_PREFIX_3 are defined. */ -void ast_verbose(const char *fmt, ...) - __attribute__ ((format (printf, 1, 2))); +void __ast_verbose(const char *file, int line, const char *func, const char *fmt, ...) + __attribute__ ((format (printf, 4, 5))); + +#define ast_verbose(...) __ast_verbose(__FILE__, __LINE__, __PRETTY_FUNCTION__, __VA_ARGS__) void ast_child_verbose(int level, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); diff --git a/main/logger.c b/main/logger.c index cc062d968..a4936badd 100644 --- a/main/logger.c +++ b/main/logger.c @@ -1156,7 +1156,7 @@ void ast_backtrace(void) #endif } -void ast_verbose(const char *fmt, ...) +void __ast_verbose(const char *file, int line, const char *func, const char *fmt, ...) { struct logmsg *logmsg = NULL; struct ast_str *buf = NULL; @@ -1198,7 +1198,7 @@ void ast_verbose(const char *fmt, ...) strcpy(logmsg->str, buf->str); - ast_log(LOG_VERBOSE, "%s", logmsg->str + 1); + ast_log(__LOG_VERBOSE, file, line, func, "%s", logmsg->str + 1); /* Set type */ logmsg->type = LOGMSG_VERBOSE; diff --git a/utils/ael_main.c b/utils/ael_main.c index 1fc955ab9..f8477edd1 100644 --- a/utils/ael_main.c +++ b/utils/ael_main.c @@ -108,7 +108,7 @@ void ast_cli_unregister_multiple(void); void ast_context_destroy(void); void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...); char *ast_process_quotes_and_slashes(char *start, char find, char replace_with); -void ast_verbose(const char *fmt, ...); +void __ast_verbose(const char *file, int line, const char *func, const char *fmt, ...); struct ast_app *pbx_findapp(const char *app); void filter_leading_space_from_exprs(char *str); void filter_newlines(char *str); diff --git a/utils/hashtest.c b/utils/hashtest.c index bce9d8c2e..95f463da7 100644 --- a/utils/hashtest.c +++ b/utils/hashtest.c @@ -347,7 +347,7 @@ void ast_log(int level, const char *file, int line, const char *function, const va_end(vars); } -void ast_verbose(const char *fmt, ...) +void __ast_verbose(const char *file, int line, const char *func, const char *fmt, ...) { va_list vars; va_start(vars,fmt); diff --git a/utils/hashtest2.c b/utils/hashtest2.c index aa81719b6..2865822ab 100644 --- a/utils/hashtest2.c +++ b/utils/hashtest2.c @@ -359,7 +359,7 @@ void ast_log(int level, const char *file, int line, const char *function, const va_end(vars); } -void ast_verbose(const char *fmt, ...) +void __ast_verbose(const char *file, int line, const char *func, const char *fmt, ...) { va_list vars; va_start(vars,fmt); diff --git a/utils/refcounter.c b/utils/refcounter.c index 4d4d9dbb0..5e750619e 100644 --- a/utils/refcounter.c +++ b/utils/refcounter.c @@ -250,7 +250,7 @@ void ast_log(int level, const char *file, int line, const char *function, const va_end(vars); } -void ast_verbose(const char *fmt, ...) +void __ast_verbose(const char *file, int line, const char *func, const char *fmt, ...) { va_list vars; va_start(vars,fmt); |