Metadata-Version: 2.1
Name: lavender-logging
Version: 1.0.0
Summary: An opinionated logger and configuration system.
Home-page: https://github.com/NimajnebEC/lavender-logging
License: MIT
Author: NimajnebEC
Author-email: nimajnebec@users.noreply.github.com
Requires-Python: >=3.8.1,<4.0.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Project-URL: Repository, https://github.com/NimajnebEC/lavender-logging
Description-Content-Type: text/markdown

# Lavender Logging

Lavender Logging is a logger configuration system designed to simplify the process of configuring your logger to only log the messages you want to see.

## Usage

To use Lavender simply call `lavender.setup()` instead of `logging.basicConfig()`. This will enable all of Lavender's features and ensure it works as intended.

Lavender uses its own filter system, configured using patterns which match package names. For example `discord.*` matches all submodules of the `discord` package. Filters can be added using the `filter_config` parameter of `lavender.setup` or using environment variables.

Lavender looks for evironment variables with `LOG_DEBUG`, `LOG_INFO`, `LOG_WARNING` etc to extract patterns from. Multiple patterns can be specified for the same log level by separating them with `os.pathsep`. For example, the following will set the log level of `amethyst.client` and all submodules of `discord` and to `ERROR` on windows.

```
LOG_ERROR="amethyst.client;discord.*"
```

Filters that infer more of a package's path with wildcards have less priority over more specific patterns. For example with the patterns `discord.*` and `discord.gateway.*`, `discord.gateway.*` will have priority.

