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


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 File type Python version Upload date Hashes
Filename, size apperror-1.1.0.tar.gz (9.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page