loguru
loguru copied to clipboard
Python logging made (stupidly) simple
It should help with catching this kind of problem [referenced in the documentation](https://loguru.readthedocs.io/en/stable/resources/recipes.html#security-considerations-when-using-loguru): ```python SECRET_KEY = 'Y0UC4NTS33Th1S!' class SomeValue: def __init__(self, value): self.value = value # If user types "{value.__init__.__globals__[SECRET_KEY]}"...
since we are using new style format, it's possible to control how value are formatted with `__format__` current `lazy` option is not necessary, we can add a `LazyValue` type, this...
```python class Color(Enum): scarlet = "scarlet" pink = "pink" orange = "orange" blue = "blue" purple = "purple" from colorama import init, Fore, Style init() def colorize(color: Color, text: str)...
**loguru config** ``` if logger_config_data.get("kafka") and logger_config_data["kafka"]["enable"]: logger.debug("kafka handler enabled") kafka_handler = KafkaLoggingHandler(kafka_brokers=logger_config_data["kafka"]["broker"], topic=logger_config_data["kafka"]["topic"]) logger.add( kafka_handler.commit, format=Logger.kafka_format(app_name=APP_NAME, env=config_info.get_env()), level=logger_config_data["kafka"]["level"].upper(), backtrace=True, diagnose=True, serialize=True ) ``` **format** ``` @staticmethod def get_format_dict(app_name, env):...
this is not a production issue, I am a student... perhaps I am the problem; I recently installed and began using uv for my python development studies, and I have...
Hey, I wanted to explore whether you'd consider adding additional data to log records that get passed to handlers, namely: * `args` * `kwargs` * `raw_message` (or maybe `template`): the...
``` $ python3.14 --version 3.14.0a6 $ python3.14 -m venv _e $ . _e/bin/activate (_e) $ pip install tox (_e) $ tox […] ========================================================================================== short test summary info =========================================================================================== FAILED tests/test_exceptions_formatting.py::test_exception_others[recursion_error]...
Bumps [tox](https://github.com/tox-dev/tox) from 4.24.1 to 4.26.0. Release notes Sourced from tox's releases. 4.26.0 What's Changed Add a missing quote in a TOML example @ config.rst by @webknjaz in tox-dev/tox#3509 Add...
Bumps [mypy](https://github.com/python/mypy) from v1.15.0 to 1.16.0. Changelog Sourced from mypy's changelog. Mypy Release Notes Next Release Mypy 1.16 We’ve just uploaded mypy 1.16 to the Python Package Index (PyPI). Mypy...
Hi! I encountered an issue when trying to dynamically format log file names using fields from the log record (e.g., values from the `extra` dict). For example, I expected the...