Skip to main content

Documentation build, testing and linting for the master branch.

https://readthedocs.org/projects/logger-helper/badge/?version=latest https://travis-ci.org/vimist/logger-helper.svg?branch=master https://api.codeclimate.com/v1/badges/17691babd47c3cc19e91/maintainability https://api.codeclimate.com/v1/badges/17691babd47c3cc19e91/test_coverage

Logger Helper

Logger Helper provides a simple way to gather verbose logs within your application. Set up your logging using the standard logging library and decorate your classes, methods and functions (or even do it at the module level with the mod method) to get detailed logs of what your application is doing:

Calling __main__.Test.add(a = 1, b = 2, c = 3)
Returned 6 from __main__.Test.add
Calling __main__.Test.subtract(a = 3, b = 2, c = 2)
Returned -1 from __main__.Test.subtract
Calling __main__.Test.divide_by_zero(a = 10)
Exception ZeroDivisionError occurred, "division by zero"

Installation

To install the Logger Helper package, ensure you have pip installed using your distributions package manager and then run the following command:

pip install logger-helper

Basic Usage

You can start using the LoggerHelper right away.

import logging
from logger_helper import LoggerHelper

# Perform your standard logging setup here

log = LoggerHelper(logging.getLogger(__name__), logging.DEBUG)

# DONE! Start decorating your modules, classes and functions:

@log
class MyClass:
    def method_1(self):
        pass

    def method_2(self):
        pass

@log
def function():
    pass

For more information, be sure to read the documentation. If you clone this repository and install invoke, you can serve the documentation locally with invoke serve-docs.

Metadata

Release files for logger-helper 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for logger-helper 0.0.2
File Size Uploaded Provenance Actions
logger-helper-0.0.2.tar.gz 4.8 kB Without provenance Details for logger-helper-0.0.2.tar.gz

Release files / logger-helper-0.0.2.tar.gz

Download URL logger-helper-0.0.2.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c8315970682ed16395b1410ed59716f2d57792cbaa5146bb7238dbaa1695c866
BLAKE2b-256 checksum
How to use checksums
9ae603d1f1679e33da614d0fb98c37f3fb8e74320ab11552434036f926425ba2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for logger-helper 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page