mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 09:23:33 +08:00
Improved logging with both compile and runtime level filtering
The device level debug will have to be removed and the debugging can be based on this new logging structure which can tell where an error (or debug output) occured whch the current implmentation cannot. The one limitation is the new macros cannot take a char* for the format parameter. It must be an actual string literal because it is concatenated with other strings. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -2,5 +2,6 @@
|
||||
# Common OS porting APIs
|
||||
#
|
||||
|
||||
SRCS = px4_getopt.c
|
||||
SRCS = px4_getopt.c \
|
||||
px4_log.c
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#include <px4_log.h>
|
||||
|
||||
__EXPORT unsigned int __px4_log_level_current = PX4_LOG_LEVEL_AT_RUN_TIME;
|
||||
|
||||
__EXPORT const char *__px4_log_level_str[_PX4_LOG_LEVEL_DEBUG+1] = { "INFO", "PANIC", "ERROR", "WARN", "DEBUG" };
|
||||
Reference in New Issue
Block a user