diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/core/fsm.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h index fba5497b..026ed01a 100644 --- a/include/osmocom/core/fsm.h +++ b/include/osmocom/core/fsm.h @@ -110,11 +110,14 @@ struct osmo_fsm_inst { void osmo_fsm_log_addr(bool log_addr); -#define LOGPFSM(fi, fmt, args...) \ - LOGP((fi)->fsm->log_subsys, (fi)->log_level, "%s{%s}: " fmt, \ +#define LOGPFSML(fi, level, fmt, args...) \ + LOGP((fi)->fsm->log_subsys, level, "%s{%s}: " fmt, \ osmo_fsm_inst_name(fi), \ osmo_fsm_state_name((fi)->fsm, (fi)->state), ## args) +#define LOGPFSM(fi, fmt, args...) \ + LOGPFSML(fi, (fi)->log_level, fmt, ## args) + int osmo_fsm_register(struct osmo_fsm *fsm); void osmo_fsm_unregister(struct osmo_fsm *fsm); struct osmo_fsm_inst *osmo_fsm_inst_alloc(struct osmo_fsm *fsm, void *ctx, void *priv, |