-
Notifications
You must be signed in to change notification settings - Fork 0
Logging
Tristan Israël edited this page Feb 16, 2026
·
3 revisions
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 can be achieved in multiple ways:
- the system messaging infrastructure using specific topics
system/events/#. See Protocol. - the API using the Logging Helper class. See API.
- syslog-ng using the package safecor-syslog.
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
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.
Event emission is simplified through the Python class Logger.
Here are examples:
Logger().debug("Debug message", "Module name")
Logger().info("Informational message")