-
Notifications
You must be signed in to change notification settings - Fork 0
Logging
Tristan Israël edited this page Feb 22, 2026
·
3 revisions
This page describes the logging strategy and the mechanisms implemented.
Logging occurs at two levels:
- Operating system: services record events in the file
/var/log/safecor/system.logthrough thesyslogfacility. - Business application: applications and the platform generate events related to the operation of the product and send them through the messaging bus.
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")