Skip to content

Refactor the logging system #338

@luziferius

Description

@luziferius

Classification:

Enhancement

Version

AutoKey version: git master/develop
Used GUI (Gtk, Qt, or both): both

Summary

The current logging system is lacklustre and not really helpful.
Some parts of AutoKey completely lack any logging (like the GTK GUI), and some use different approaches. The Qt5-GUI already uses a hierarchical logger system (but logging is incomplete, nonetheless), but the model, X interface and others use plain logger instances.

To improve the current situation, implement a uniform way to use the logging framework built into Python.

  • Add a logging module to the autokey package that contains a setup function that initializes the system. For example, re-use this from one of my other side-projects: https://github.com/luziferius/av1transcoder/blob/master/av1transcoder/logger.py
  • Add a logger instance to each module that can be used to log various actions.
  • Use a hierarchical logger, so that sub-loggers inhere the parent configuration.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions