Return to site

Gajary web log guru

broken image
broken image
broken image

The default behaviour - importing loguru.logger and using it as an instance of Python's standard library logging.Logger class - is already sufficient for smaller projects and sample code. If you execute the snippet on your local machine, you will also recognise that loguru innately supports coloured log messages. Note, that the file location is _main_ because we executed hello.py directly.įurthermore, the scope is set to as the log message is located in the module's scope and not inside a function or class.

broken image