Skip to main content

Python debug logging helpers

Project description

debug_this

Package Status Documentation Status License Status Build Status Quality Status

Python debug logging helpers

@debug_this.function

This decorator can be used to log the execution of a function.

import logging
import debug_this

logging.basicConfig(level=logging.DEBUG)

logger = logging.getLogger(__name__)

@debug_this.function(logger)
def example_function():
    logger.info("This is example_function")

example_function()

The resulting logs should look like this:

DEBUG:__main__:  >>> example_function
INFO:__main__:This is example_function
DEBUG:__main__:  <<< example_function

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

debug_this-0.2.0.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

debug_this-0.2.0-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

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