summaryrefslogtreecommitdiffstats
path: root/include/osmocom/core
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-05-31 15:30:15 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2019-02-26 20:57:58 +0000
commit050f2d3259bbde52eb4544ad312d5c38828cc869 (patch)
treeffea9389d885e344f70ad918ba3a5335f24c7a3d /include/osmocom/core
parent047f3872f511353e894659719a6c5346249bca40 (diff)
log: fsm: allow logging the timeout on state change
Add a flag that adds timeout info to osmo_fsm_inst state change logging. To not affect unit testing, make this an opt-in feature that is disabled by default -- mostly because osmo_fsm_inst_state_chg_keep_timer() will produce non-deterministic logging depending on timing (logs remaining time). Unit tests that don't verify log output and those that use fake time may also enable this feature. Do so in fsm_test.c. The idea is that in due course we will add osmo_fsm_log_timeouts(true) calls to all of our production applications' main() initialization. Change-Id: I089b81021a1a4ada1205261470da032b82d57872
Diffstat (limited to 'include/osmocom/core')
-rw-r--r--include/osmocom/core/fsm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h
index df7e3486..ae1c8575 100644
--- a/include/osmocom/core/fsm.h
+++ b/include/osmocom/core/fsm.h
@@ -118,6 +118,7 @@ struct osmo_fsm_inst {
};
void osmo_fsm_log_addr(bool log_addr);
+void osmo_fsm_log_timeouts(bool log_timeouts);
/*! Log using FSM instance's context, on explicit logging subsystem and level.
* \param fi An osmo_fsm_inst.