Skip to content

loguru_utils

Utilities, classes, functions, constants, & more for the loguru library.

When using the init_logger() function, make sure to run it as soon as possible. If possible, start your script like:

1
2
3
4
5
6
7
8
9
...

## List of Loguru sink dicts
loguru_sinks = [LoguruSinkStdOut(level="DEBUG").as_dict(), LoguruSinkErrFile().as_dict()]

if __name__ == "__main__":
    init_logger(sinks=loguru_sinks)

    ...