summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/core/fsm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h
index 67e00ad7..9e1062f5 100644
--- a/include/osmocom/core/fsm.h
+++ b/include/osmocom/core/fsm.h
@@ -120,7 +120,8 @@ struct osmo_fsm_inst {
void osmo_fsm_log_addr(bool log_addr);
#define LOGPFSML(fi, level, fmt, args...) \
- LOGP((fi)->fsm->log_subsys, level, "%s{%s}: " fmt, \
+ LOGP((fi)->fsm->log_subsys, OSMO_MAX(level, (fi)->log_level), \
+ "%s{%s}: " fmt, \
osmo_fsm_inst_name(fi), \
osmo_fsm_state_name((fi)->fsm, (fi)->state), ## args)