mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
logger.h: Fix ast_trace to respect scope_level
ast_trace() was always emitting messages when it's level was set to -1 because it was ignoring scope_level. Change-Id: I849c8f4f4613899c37f82be0202024e7d117e506
This commit is contained in:
@@ -663,7 +663,7 @@ void __attribute__((format (printf, 6, 7))) __ast_trace(const char *file, int li
|
||||
*/
|
||||
#define ast_trace_raw(level, indent_type, ...) \
|
||||
ast_debug(level < 0 ? __scope_level : level, " " __VA_ARGS__); \
|
||||
if (TRACE_ATLEAST(level)) { \
|
||||
if (TRACE_ATLEAST(level < 0 ? __scope_level : level)) { \
|
||||
__ast_trace(__FILE__, __LINE__, __PRETTY_FUNCTION__, indent_type, 0, " " __VA_ARGS__); \
|
||||
}
|
||||
|
||||
@@ -678,7 +678,7 @@ void __attribute__((format (printf, 6, 7))) __ast_trace(const char *file, int li
|
||||
*/
|
||||
#define ast_trace(level, ...) \
|
||||
ast_debug(level < 0 ? __scope_level : level, " " __VA_ARGS__); \
|
||||
if (TRACE_ATLEAST(level)) { \
|
||||
if (TRACE_ATLEAST(level < 0 ? __scope_level : level)) { \
|
||||
__ast_trace(__FILE__, __LINE__, __PRETTY_FUNCTION__, AST_TRACE_INDENT_SAME, 0, " " __VA_ARGS__); \
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user