Skip to main content

A simple, yet powerful Python logging library that makes you say goodbye to your standard logger.

Project description

ByeByeLogger

Oh, great! Another logging package, because obviously, we need more of those, right? Well, let me introduce you to ByeByeLogger, the one that's going to make you say goodbye to your current logger (whether you like it or not).

Installation

To get this totally groundbreaking package, just do the usual pip dance:

pip install byebyelogger

Features

  • Create simple loggers with just a few lines of code
  • Customize log output with colors, formats, and callables
  • Easily integrate with existing codebases

Example Usage

Simple Logger

Create a simple logger with a custom color and level:

from byebyelogger import single_logger
from byebyelogger.style.color import RED
from byebyelogger.style.format import SQUARE_BRACKETS

logger = single_logger(RED, "INFO", SQUARE_BRACKETS)
logger.log("This is an example message.")

Output:

[INFO] This is an example message.

Nested Logger

from byebyelogger import nested_logger
from byebyelogger.style.color import LIGHTCYAN_EX
from byebyelogger.style.format import SQUARE_BRACKETS
from datetime import datetime

def timestamp_func():
    return datetime.now().strftime("%Y-%m-%d %H:%M:%S")

components = [
    (timestamp_func, SQUARE_BRACKETS),
    ("SQLITE", SQUARE_BRACKETS),
    (LIGHTCYAN_EX("INFO"), None),
]

logger = nested_logger(components)
logger.log("This is an example message.")

Output:

[2023-01-01 01:00:00] [SQLITE] INFO This is an example message.

Documentation

For more detailed information on how to use ByeByeLogger, please refer to the inline documentation in the package files:

  • logger.py
  • core/configuration.py
  • core/stack_info.py
  • style/color.py
  • style/format.py

License

ByeByeLogger is released under the MIT License.

Contributing

We welcome contributions to ByeByeLogger! If you'd like to contribute, please fork the repository and submit a pull request. We'll review your changes and merge them in if everything looks good.

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

ByeByeLogger-3.0.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ByeByeLogger-3.0.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file ByeByeLogger-3.0.0.tar.gz.

File metadata

  • Download URL: ByeByeLogger-3.0.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for ByeByeLogger-3.0.0.tar.gz
Algorithm Hash digest
SHA256 a55e42645de1c2dbb5b604cff4afc11f1aa7d6678aac40f94efa0019a4ce9180
MD5 8fbc0851f326d18b71bc64b2febb9141
BLAKE2b-256 597881eb8147ceccb0746fc7db06063ff4a2b8f01484dd5262a0687e0ceca452

See more details on using hashes here.

File details

Details for the file ByeByeLogger-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: ByeByeLogger-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for ByeByeLogger-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9cfc5f3510612b9982be2d3bf0be46388713cb51233a184ab44126468dfbfc9
MD5 6722111be3785a94980eb9b8563e04c0
BLAKE2b-256 7aedd723bf054dfadc914fbfbadd4b2134d59fd1dfb67d28bd443320306d1600

See more details on using hashes here.

Supported by

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