Overview

libranet_logging is an easy to use logging-configuration reading the configuration for loggers, handlers, filters and formatters from a logging.yml-file.

Overview urls

Why use logging?

Logfiles are your best-friend

  • during development, where debugmode is developmentmode

  • more important: while running in PRD, - it shows how the application is being used, by whom, and if it’s successfull - allows to become pro-active. There is no need to wait for bugreports from users.

  • most important: during urgent troubleshooting on PRD (AKA panic-mode) - heisenbugs, difficult to reproduce.

Goal of libranet_logging

Make it as easy as possible to enable and properly use the full power of the python logging-framework

python logging-module contains:
  • loggers, hierarchical

  • handlers - formatters - filters

Think of logger=message-channel, handler=subscriber to a channel

Minimize the need to make changes in code

Move all config out of code and into a config-file “logging.yml”

  • logging to a file should be as simple as:
    >>> import logging
    >>> logging.getLogger('panicmode')
    

Features