Page MenuHomeVyOS Platform

Need to create a common logging module for Python scripts
In progress, WishlistPublicFEATURE 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
Issue type
Internal change (not visible to end users)

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.

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).

erkin set Issue type to Internal change (not visible to end users).Aug 30 2021, 7:24 AM
erkin removed a subscriber: Active contributors.
Viacheslav triaged this task as Wishlist priority.Jan 20 2024, 12:51 AM
Viacheslav edited projects, added VyOS 1.5 Circinus; removed VyOS 1.3 Equuleus (1.3.6).