python-loguru
Port variant v12
Summary Python logging made (stupidly) simple (3.12)
BROKEN
Package version 0.7.3
Homepage https://github.com/Delgan/loguru
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants v13
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 15 DEC 2024, 19:32:11 UTC
Port created 08 JAN 2023, 04:18:24 UTC
Subpackage Descriptions
single

[image]

[image] [image] [image] [image] [image] [image] [image]

[image]

______________________________________________________________________ **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. ## 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 ### Ready to use out of the box without boilerplate The main concept of Loguru is that **there is one and only one** [`logger`]. For convenience, it is pre-configured and outputs to `stderr` to begin with (but that's entirely configurable). ```python from loguru import logger logger.debug("That's it, beautiful and simple logging!") ``` The [`logger`] is just an interface which dispatches log messages to configured handlers. Simple, right? ### No Handler, no Formatter, no Filter: one function to rule them all How to add a handler? How to set up logs formatting? How to filter messages? How to set level? One answer: the [`add()`] function. ```python logger.add(sys.stderr, format="{time} {level} {message}", filter="my_module", level="INFO") ``` This function should be used to register [sinks] which are responsible for managing [log messages] contextualized with a [record dict]. A sink can take many forms: a simple function, a string path, a file-like object, a
Configuration Switches (platform-specific settings discarded)
PY312 ON Build using Python 3.12 PY313 OFF Build using Python 3.13
Package Dependencies by Type
Build (only) python312:dev:std
python-pip:single:v12
autoselect-python:single:std
Build and Runtime python312:primary:std
Download groups
main mirror://PYPIWHL/0c/29/0348de65b8cc732daa3e33e67806420b2ae89bdce2b04af740289c5c6c8c
Distribution File Information
31a33c10c8e1e10422bfd431aeb5d351c7cf7fa671e3c4df004162264b28220c 61595 python-src/loguru-0.7.3-py3-none-any.whl
Ports that require python-loguru:v12
python-netbox-network-importer:v12 Tool to import network into Netbox (3.12)