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.
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.
Changelog
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.1.1.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ce52b507c2a6cf3a2772a81a0bda52fb7a00edaadb5fd767978e5bd957e4cea |
|
MD5 | ea9e315a5d99a5fbd56feae9d551caea |
|
BLAKE2b-256 | b50049f6bd716d444221ed2b1471c9271109425b319e3a67d2dd38421b498da5 |