Neels Hofmeyr has uploaded this change for review. (
https://gerrit.osmocom.org/12384
Change subject: add API doc for LOGPFSM* macros
......................................................................
add API doc for LOGPFSM* macros
Change-Id: I3bf6500889aa58195f50a726dec0876c0c2baec3
---
M include/osmocom/core/fsm.h
1 file changed, 31 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/84/12384/1
diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h
index ee71451..0b02e9a 100644
--- a/include/osmocom/core/fsm.h
+++ b/include/osmocom/core/fsm.h
@@ -119,9 +119,24 @@
void osmo_fsm_log_addr(bool log_addr);
+/*! Log using FSM instance's context, on explicit logging level.
+ * \param fi An osmo_fsm_inst.
+ * \param level A logging level, e.g. LOGL_INFO.
+ * \param fmt printf-like string format.
+ * \param args String format arguments.
+ */
#define LOGPFSML(fi, level, fmt, args...) \
LOGPFSMLSRC(fi, level, __FILE__, __LINE__, fmt, ## args)
+/*! Log using FSM instance's context, on explicit logging level, and with
explicit source file and line info.
+ * The log subsystem to log on is obtained from the underlying FSM definition.
+ * \param fi An osmo_fsm_inst.
+ * \param level A logging level, e.g. LOGL_INFO.
+ * \param caller_file A string constant containing a source file path, like
__FILE__.
+ * \param caller_line A number constant containing a source file line, like
__LINE__.
+ * \param fmt printf-like string format.
+ * \param args String format arguments.
+ */
#define LOGPFSMLSRC(fi, level, caller_file, caller_line, fmt, args...) \
LOGPSRC((fi)->fsm->log_subsys, level, \
caller_file, caller_line, \
@@ -130,9 +145,25 @@
osmo_fsm_state_name((fi)->fsm, (fi)->state), \
## args)
+/*! Log using FSM instance's context.
+ * The log level to log on is obtained from the FSM instance.
+ * The log subsystem to log on is obtained from the underlying FSM definition.
+ * \param fi An osmo_fsm_inst.
+ * \param fmt printf-like string format.
+ * \param args String format arguments.
+ */
#define LOGPFSM(fi, fmt, args...) \
LOGPFSML(fi, (fi)->log_level, fmt, ## args)
+/*! Log using FSM instance's context, with explicit source file and line info.
+ * The log level to log on is obtained from the FSM instance.
+ * The log subsystem to log on is obtained from the underlying FSM definition.
+ * \param fi An osmo_fsm_inst.
+ * \param caller_file A string constant containing a source file path, like
__FILE__.
+ * \param caller_line A number constant containing a source file line, like
__LINE__.
+ * \param fmt printf-like string format.
+ * \param args String format arguments.
+ */
#define LOGPFSMSRC(fi, caller_file, caller_line, fmt, args...) \
LOGPFSMLSRC(fi, (fi)->log_level, \
caller_file, caller_line, \
--
To view, visit https://gerrit.osmocom.org/12384
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3bf6500889aa58195f50a726dec0876c0c2baec3
Gerrit-Change-Number: 12384
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <[email protected]>