Skip to content

Add additional logging levels using a sub-classed logger #26

@DaveStrickland

Description

@DaveStrickland

The standard python logger comes with the following named log levels: NOTSET, DEBUG, INFO, WARNING, ERROR, CRITICAL. In practice this limits logging of nominal processing to two levels: DEBUG and INFO, with occasional WARNING messages.

This flattened hierarchy results in large numbers of logged events having the same level and obscures the processing flow when operating on large numbers of files. The Boost logging library has a addition level below DEBUG called TRACE which is useful for tracing program execution at a lower level than DEBUG.

Sub-class the python logging class in AstroPhotography.core.logger to add new named levels:

  • TRACE at a level below DEBUG
  • OVERVIEW at a level above INFO but below WARNING

The new logging class should support named member function calls of the form logger.trace(msg: str) and logger.overview(msg: str)

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions