Skip to main content

Documentation build, testing and linting for the master branch.

https://readthedocs.org/projects/logger-helper/badge/?version=latest https://img.shields.io/pypi/v/logger-helper.svg 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.1.0

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.1.0
File Size Uploaded Provenance
logger-helper-0.1.0.tar.gz 4.6 kB Without provenance Details

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

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

Security for logger-helper 0.1.0

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.

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