-
Notifications
You must be signed in to change notification settings - Fork 0
Logging
This page describes the logging strategy and the mechanisms implemented.
Logging occurs at two levels:
- Operating system: services can record a number of events in files located in
/var/logor send them to a log manager such assyslog. - Business application: applications and the platform generate events related to the operation of the product.
Only business events are covered in this documentation.
Logging uses the system messaging infrastructure through specific topics system/events.
The debug level is set using the command system/events/set_loglevel.
Sharing log information is done via notifications system/events/[loglevel] where loglevel can be:
-
debug: Debugging information -
info: General information -
warn: Warning -
error: Software error impacting only part of the system functions -
critical: Software or hardware error preventing the system from operating
Event emission is simplified through the Python class Logger. It is used as follows:
Logger().debug("Debug message", "Module name")
or Logger().info("Informational message").
The platform automatically saves all events at or above the level defined by the set_loglevel command (or info by default) into a file that can be copied or downloaded on demand. The logging level can be configured to keep only a subset of events.
The command to retrieve the log is system/events/save_log.