Page MenuHomeVyOS Platform

Need to create a common logging module for Python scripts
In progress, Requires assessmentPublicFEATURE REQUEST

Description

To make logs creating more comfortable for developers (and more actively used), we need to prepare a single common module for this purpose.
Requirements:

  • it must be easy to add to Python scripts and ready to use immediately after the import;
  • it must provide a way to reconfiguration from the script directly (changing logging level, logs destination)
  • by default should be used systemd journal as a target.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible

Event Timeline

zsdc changed the task status from Open to In progress.Apr 8 2020, 5:20 PM
zsdc claimed this task.
zsdc created this task.
thomas-mangin added a subscriber: thomas-mangin.EditedJul 29 2020, 2:36 PM

It may be a good idea to also have an option to hook debug logging to syslog.

This is currently controlled using debug flags, and there is no way to set this via configure.

Users are also unlikely to setup /{tmp,config}/vyos.developer.debug when they find issues. So should we have another /config file which would be setup via the CLI on commit to indicate that the debug logging should be sent to syslog?

(The logging code should not have any dependence on loading the configuration as it creates a circular loop).