aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/include/openbsc/debug.h')
-rw-r--r--openbsc/include/openbsc/debug.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/debug.h b/openbsc/include/openbsc/debug.h
index c1098a53c..fc387cec3 100644
--- a/openbsc/include/openbsc/debug.h
+++ b/openbsc/include/openbsc/debug.h
@@ -44,4 +44,15 @@ void debug_use_color(int use_color);
void debug_timestamp(int enable);
extern unsigned int debug_mask;
+/* new logging interface */
+#define LOGP(ss, level, fmt, args...) debugp(ss, __FILE__, __LINE__, 0, fmt, ##args)
+#define LOGPC(ss, level, fmt, args...) debugp(ss, __FILE__, __LINE__, 1, fmt, ##args)
+
+/* different levels */
+#define LOGL_DEBUG 1 /* debugging information */
+#define LOGL_INFO 3
+#define LOGL_NOTICE 5 /* abnormal/unexpected condition */
+#define LOGL_ERROR 7 /* error condition, requires user action */
+#define LOGL_FATAL 8 /* fatal, program aborted */
+
#endif /* _DEBUG_H */