single |
:align: center
:alt: Loguru logo
:align: center
:alt: Loguru demo
=========
:alt: Pypi version
:alt: Python versions
:alt: Docs
:alt: Build status
:alt: Coverage
:alt: Code quality
:alt: License
**Loguru** is a library which aims to bring enjoyable logging in Python.
Did you ever feel lazy about configuring a logger and used ``print()``
instead?... I did, yet logging is fundamental to every application and
eases the process of debugging. Using **Loguru** you have no excuse not to
use logging from the start, this is as simple as from loguru import logger.
Also, this library is intended to make Python logging less painful by
adding a bunch of useful functionalities that solve caveats of the standard
loggers. Using logs in your application should be an automatism, **Loguru**
tries to make it both pleasant and powerful.
.. end-of-readme-intro
Installation
------------
::
pip install loguru
Features
--------
* `Ready to use out of the box without boilerplate`_
* `No Handler, no Formatter, no Filter: one function to rule them all`_
* `Easier file logging with rotation / retention / compression`_
* `Modern string formatting using braces style`_
* `Exceptions catching within threads or main`_
* `Pretty logging with colors`_
* `Asynchronous, Thread-safe, Multiprocess-safe`_
* `Fully descriptive exceptions`_
* `Structured logging as needed`_
* `Lazy evaluation of expensive functions`_
* `Customizable levels`_
* `Better datetime handling`_
* `Suitable for scripts and libraries`_
* `Entirely compatible with standard logging`_
* `Personalizable defaults through environment variables`_
* `Convenient parser`_
* `Exhaustive notifier`_
* `10x faster than built-in logging`_
Take the tour
-------------
.. |logger| replace:: logger
.. _logger:
https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger
.. |add| replace:: ``add()``
.. _add:
https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.add
.. |remove| replace:: ``remove()``
.. _remove:
https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.remove
.. |complete| replace:: ``complete()``
.. _complete:
https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.complete
.. |catch| replace:: ``catch()``
.. _catch:
https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.catch
.. |bind| replace:: ``bind()``
.. _bind:
https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.bind
.. |contextualize| replace:: ``contextualize()``
.. _contextualize:
https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.contextualize
.. |patch| replace:: ``patch()``
.. _patch:
https://loguru.readthedocs.io/en/stable/api/logger.html#loguru._logger.Logger.patch
|