Skip to main content

Log the important data when a exception occurs.

Project description

Pest control

Bugs are bad, but it's even worse when it happens in production, this is why it is a good idea to document all data possible when a exception occurs.

Installing

pip3 install exterminator

Usage

You have three options.

As a decorator

from exterminator import Exterminator

@Exterminator()
def main_function():
    # do stuff that might work

main_function()

As a context manager

from exterminator import Exterminator

with Exterminator():
    # do stuff, you know the thing

Globally

from exterminator import Exterminator

Exterminator().globally()

# that's it! now every exception that is not handled will be looged

Important Note

If you are going to except all errors the context manager and globally solution wont work for you, the only option for you will be:

from exterminator import Exterminator

@Exterminator()
def main_function():
    # do stuff that work or not

try:
    main_function()
except:
    # do some stuff of you own...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

exterminator-0.8-py3-none-any.whl (3.4 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