Autologging

beta

Easier logging and tracing of Python functions and class methods.

Add a Review
1 Download (This Week)
Last Update:
Download Autologging-0.4.0.zip
Browse All Files
Windows Mac Linux

Description

Autologging provides two decorators and a metaclass:

@logged
- creates a class-level '__logger' member
- the logger is automatically named to match the dotted-name of the class

@traced
- decorates a module-level function to provide call/return tracing
- log record attributes (pathname, filename, lineno, module, funcName)
are correctly preserved (i.e. they refer to the original function, NOT
the proxy function returned by the decorator)

TracedMethods
- creates a metaclass that adds automatic tracing to specified class
methods (just like @traced does for module-level functions)
- log record attributes (pathname, filename, lineno, module, funcName)
are correctly preserved (i.e. they refer to the original class method,
NOT the proxy method installed by the metaclass)

Additionally, the autologging module defines and registers a custom
log level named "TRACE" (level 1) so that tracing messages can be
toggled on/off independently of DEBUG-level logging.

Autologging Web Site

Categories

Logging, Libraries

License

MIT License

KEEP ME UPDATED

Write a Review

User Reviews

Be the first to post a review of Autologging!

Additional Project Details

Intended Audience

Developers

Programming Language

Python

Registered

2013-03-28
Screenshots can attract more users to your project.
Features can attract more users to your project.