Skip to main content

An opinionated logger and configuration system.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lavender_logging-1.0.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

lavender_logging-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file lavender_logging-1.0.0.tar.gz.

File metadata

  • Download URL: lavender_logging-1.0.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.0 Windows/11

File hashes

Hashes for lavender_logging-1.0.0.tar.gz
Algorithm Hash digest
SHA256 85a1641a3178db1ae56da4d3d7da97566f5c950b909b8dd31f2e8562621ff350
MD5 3f207a212db46c786d3847ef61386d13
BLAKE2b-256 126e8057ac2ad82abca26663fddf7ffadd260758ad2cdce269dd8dc55cb82d4b

See more details on using hashes here.

File details

Details for the file lavender_logging-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lavender_logging-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da8ea15f94e56fe21523fc602d7eddb386569ed70e9e13ef3914aa70217fcf46
MD5 e64c2fff9318bae25dd5f19180885273
BLAKE2b-256 c69d28950bf29436f336dc1f272e27ff1dc21afc7d2ce370e4edcff5ed47f1e2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page