module documentation

License: Apache 2.0

VERSION INFO:

  $Repo: async_example_program
$Author: Anders Wiklund
  $Date: 2023-10-13 17:19:04
   $Rev: 36
Class DynamicLogFilter This class handles dynamic log level filtering.
Class InterceptHandler Send logs to loguru logger from Python logging module.
Class LogHandler This class handles enhanced console and rotating file in loguru logging.
Function path_of Return a log path depending on a static path or current_path.
Constant LEAN_FORMAT A leaner log format than the loguru default format.
def path_of(program: Optional[Path] = None) -> Path: (source)

Return a log path depending on a static path or current_path.

If program parameter is not supplied, then the log file will be created in the current program execution context.

Otherwise, the location is platform dependent.

The following python code snippet will show you where it's located:

>>> import site
>>> print(f'{site.USER_BASE}/log')
Parameters
program:Optional[Path]Program name
Returns
PathLogging path.
LEAN_FORMAT: str = (source)

A leaner log format than the loguru default format.

Value
'<green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> | <level>{level: <8}</level> | <c
yan>{extra[program]}</cyan> - <level>{message}</level>'