micone.logging package

Submodules

micone.logging.logger module

Module that contains the logger configuration

class micone.logging.logger.Log(folder: Path, format_str: str, disable: bool = True)[source]

Bases: object

Class that handles the logging Wrapper around loguru.logger

Parameters:
  • folder (pathlib.Path) – Path to the folder containing the log files The folder must already exist

  • format_str (str) – Format string for the log file “timestamp | level | message”

  • disable (bool) – Flag to disable logging at the start Default value is True

path

The path to the log file

Type:

pathlib.Path

config

The dictionary used to configure the loguru.logger

Type:

dict

logger

The main logging object

Type:

loguru.logger

cleanup(nfiles: int = 20) None[source]

Delete old logs if number > nfiles

Parameters:

nfiles (int) – The threshold for number of log files beyond which the older ones are deleted Default value is 10

enable() None[source]

Enable logging

Module contents