aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/osmo-bts/logging.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/osmo-bts/logging.h b/include/osmo-bts/logging.h
index b1b44d54..68f379c7 100644
--- a/include/osmo-bts/logging.h
+++ b/include/osmo-bts/logging.h
@@ -27,4 +27,16 @@ extern const struct log_info bts_log_info;
int bts_log_init(const char *category_mask);
+/* LOGP with gsm_time prefix */
+#define LOGPGT(ss, lvl, gt, fmt, args...) \
+ LOGP(ss, lvl, "%s " fmt, osmo_dump_gsmtime(gt), ## args)
+#define DEBUGPGT(ss, gt, fmt, args...) \
+ LOGP(ss, LOGL_DEBUG, "%s " fmt, osmo_dump_gsmtime(gt), ## args)
+
+/* LOGP with frame number prefix */
+#define LOGPFN(ss, lvl, fn, fmt, args...) \
+ LOGP(ss, lvl, "%s " fmt, gsm_fn_as_gsmtime_str(fn), ## args)
+#define DEBUGPFN(ss, fn, fmt, args...) \
+ LOGP(ss, LOGL_DEBUG, "%s " fmt, gsm_fn_as_gsmtime_str(fn), ## args)
+
#endif /* _LOGGING_H */