Skip to main content

Simple No-Frills Logging Manager

Project description

EpiLog

Simple Logging Manager

Table of Contents

Installation

Install from pypi using pip.

pip install EpiLog

or directly from github, if you want the latest dev

pip install git+https://github.com/Spill-Tea/EpiLog@main

Examples

Creating a logging manager and dispatch a logger.

import logging
from EpiLog import EpiLog

formatter = logging.Formatter("%(asctime)s | %(levelname)s | %(message)s")
manager: EpiLog = EpiLog(logging.DEBUG, formatter=formatter)
log: logging.Logger = manager.get_logger(__name__)
log.debug("We made a logger!")

# And easily remove the logger
manager.remove(log)
assert __name__ not in manager

Benchmarking real time duration to accomplish a function, or a series of tasks within a facile context manager.

import logging
from EpiLog import Benchmark

message: str = "Long Task Complete"
level: int = logging.INFO  # level to emit message
with Benchmark(log, message, level):
    perform_long_task(...)

Note, that if the level used to emit the message is below your logger level, then no message will be emitted.

License

MIT

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

epilog-1.1.2.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

EpiLog-1.1.2-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file epilog-1.1.2.tar.gz.

File metadata

  • Download URL: epilog-1.1.2.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for epilog-1.1.2.tar.gz
Algorithm Hash digest
SHA256 974243a1a9e11b1362f30ca7cf543f38b521de08bebb876802447da40b67203e
MD5 5482ca5aa978579d317f8c257c5824a7
BLAKE2b-256 afc6b5bce8ab701a6944f1c65880dcf2d516d418d7da1e4790cb459bdd08a9be

See more details on using hashes here.

File details

Details for the file EpiLog-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: EpiLog-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for EpiLog-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 00857fab1b90694a5788a3628c1247f7702b9593c19d620d302d2992d24c61ce
MD5 8a96eccfdb758e2c8903d3511944c7ec
BLAKE2b-256 71faedac951cbfa4a133560b52ef46080944e97f5adfad948f66eb18263b105c

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