Skip to main content

Made Tech R&D Logger

Project description

Rnd Logger

A python logger implementation for the Made Tech R&D department

This implementation adds in and out of office hours flexibility and overrides the inherits from the root logger provided by the python logging module. The log output when using the rnd_logger will be json

Testing

  • run make test

Creating a release

  • Commit your changes to main and then create a release on Github.
  • This will trigger a Github action that will increment the version with the tag you have chosen and publish that version to PyPi
  • Please use semantic versioning and version relative to the change you have made

Usage

  1. Use the rnd_logger: 2. python from rnd_logger import rnd_logger logger = rnd_logger.get_logger() logger.debug("Debug message") logger.info("Info message") logger.warning("Warning message") logger.error_office_hours_alert("Office hours alert message") logger.error_out_of_hours_alert("Out of office hours alert message")
  2. Testing the rnd_logger: 3. There is a caplog fixture provided by pytest 4. python import logging def test_use_case_logs_info(caplog, use_case_under_test): with caplog.at_level(logging.INFO): your_test_code() records = iter(caplog.records) record = next(records) assert record.message == "your test log"

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

rnd_logger-1.3.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

rnd_logger-1.3.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file rnd_logger-1.3.0.tar.gz.

File metadata

  • Download URL: rnd_logger-1.3.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for rnd_logger-1.3.0.tar.gz
Algorithm Hash digest
SHA256 a8b0ac8054297936b19ae94039a1d067dba7833e5e80b69cfa2d80de2fbb649e
MD5 107ccf515775c91e8e8f55c729108c7f
BLAKE2b-256 120b7a94062530b537a007b484b2450e49abd4bbb5bad09b374415bf6edf9feb

See more details on using hashes here.

File details

Details for the file rnd_logger-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: rnd_logger-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for rnd_logger-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9aa5e868e4234fa516e49123171f61d4f841f28d05215796e4da6436b43e718e
MD5 bffc28d09a84283aee83600ce73a299b
BLAKE2b-256 42b3e08c392cffc64ed7a58b0ac75b23b143a069cd06969dfeab384f96edd07a

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