-
-
Notifications
You must be signed in to change notification settings - Fork 5
Basic Logging
Andrew Gresyk edited this page Apr 1, 2022
·
2 revisions
- Inherit a class from
LoggerInterface
to implement a custom logging solution.
-
Enable logging support:
#define FFSM2_ENABLE_LOG_INTERFACE
-
Log all state methods, not just the user-overriden ones:
#define FFSM2_ENABLE_VERBOSE_DEBUG_LOG
Method | Description |
---|---|
virtual void recordMethod(Context&, const StateID, const Method); |
Record state method call |
virtual void recordTransition(Context&, const StateID, const StateID); |
Record successful transitions |
virtual void recordTaskStatus(Context&, const StateID, const StatusEvent); virtual void recordPlanStatus(Context&, const StatusEvent);
|
Record task or plan status |
virtual void recordCancelledPending(Context&, const StateID); |
Record a cancelled pending transition |
Method | Description |
---|---|
Root::Root(const Context&, LoggerInterface* const); |
Construct an instance with logger attached |
void Root::attachLogger(LoggerInterface* const); |
Attach logger after construction |