Skip to main content

Make logging and reporting of errors easier, more informative, and more "standard."

Project description

app_error.py
============

The purpose of this module is to make logging and reporting of errors easier, more informative, and more
"standard."

Please see demo.py in this distribution for usage.

===

CHANGELOG:

1.1.0: Initial version.


These are libraries that help implement the principles of effective logging.

from apperror import AppLogger, AppStatus, AppError

l = AppLogger('demo')
l.error("I owe: $", 300, " dollars to my ex")
'demo: ERROR: demo.py:38: I owe: $400 dollars to my ex'

s = AppStatus()
if s.ok: print("ok!")
'ok'

s.addError("I owe money")
if s.ok: print("ok!")
if s.hasErrors(): l.warn('We have problems: ', str(s))
demo: WARN: demo 50: We have problems: I owe money

try:
raise AppError("We have lots of problems!")
except AppError as e:
l.info(e)
'demo: INFO: demo 57: we have lots of problems!'


See demo.py for full capabilities and usage examples

Project details


Release history Release notifications

This version

1.1.0

Download files

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

Files for apperror, version 1.1.0
Filename, size & hash File type Python version Upload date
apperror-1.1.0.tar.gz (9.0 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page