cornflakes.logging.attach_log

cornflakes.logging.attach_log(obj=None, log_level=None, default_level=None, default_path='logging.yaml', env_key='LOG_CFG')

Function decorator to attach Logger to functions.

Parameter:
  • obj – Logger function or class to attach the logging to.

  • log_level (int | None) – log-level for the current object logging.

  • default_path (str) – Default path to logging config file.

  • default_level (int | None) – Default log-level (Logging.INFO).

  • env_key (str) – Environment key to use for logging configuration.

Rückgabe:

Object with attached logging instance