Persistent logging for Plone objects
Project description
zopyx.plone.persistentlogger
zopyx.plone.persistentlogger supports persistent logging where the log data is stored on an arbitrary persistent Plone object. Typical usecases are application specific logging e.g. for logging a history per content object directly in Plone rather then having a huge common log on the filesystem. The log entries are stored using object annotations.
Usage:
from zopyx.plone.persistentlogger import IPersistentLogger def do_something(...): # ``context`` represents the current context object adapter = IPersistentLogger(context) adapter.log(u'this is a logging message') adapter.log(u'this is an error message', level='error') adapter.log(u'this is an error message', level='error', details='....')
details can be either a string or a Python datastructure like a dict, a list or a tuple. The logger will convert non-string data using the pprint module of Python into a nicely readable string.
The logs can be view through-the-web through the URL http://host/path/to/object/@@persistent-log . The logs can be clear using the URL http://host/path/to/object/@@persistent-log-clear. Both URLs require the permission of modify the related object.
All logs can be searched, sorted and filtered individually based on the Datatables.net implementation.
Repository
Changelog
0.2.0 (2015-09-10)
bugfixes, code cleanup
added “Persistent log” object action
0.1.0 (2015-08-31)
initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for zopyx.plone.persistentlogger-0.2.0.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9293a97aef7712614d691a7a81b8b191099d54d127f414321a06dd740e5a9fe |
|
MD5 | 4492267c524fc3d1269a1c9fe6fe0a33 |
|
BLAKE2b-256 | 9c41a04786f9101ccb2fe415f7eaffb3d27533982c8da58ce66e254c4b6a1d83 |