Metadata-Version: 2.1
Name: zopyx.plone.persistentlogger
Version: 0.5.1
Summary: Persistent logging for Plone objects
Home-page: http://pypi.python.org/pypi/zopyx.plone.persistentlogger
Author: Andreas Jung
Author-email: info@zopyx.com
License: GPL
Keywords: Plone Logging
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Framework :: Plone
Classifier: Framework :: Plone :: 5.2
Classifier: Framework :: Plone :: 6.0
Classifier: Framework :: Zope2
Classifier: Topic :: Software Development :: Libraries :: Python Modules

zopyx.plone.persistentlogger
============================

``zopyx.plone.persistentlogger`` supports persistent logging where the log data
is stored on an arbitrary persistent Plone object (as annotation).  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.logger 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.
``level`` can be an arbitrary string for indicating the severity of the logging
message.  The module does not perform any checking on the given message
``level``. Sorting on ``level`` is accomplished only on the lexicographical
ordering of the ``level`` values.

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.

Compatibility
-------------

- Plone 4.3
- Plone 5.0
- Plone 5.1
- Plone 5.2 (Python 3.6+, Python 2.7)

Installation
------------

Installation on Plone 4.3.X requires the following version pinning::
 
  plone.app.jquery = 1.8.3

Repository & issue tracker
--------------------------

- https://github.com/zopyx/zopyx.plone.persistentlogger

.. image:: https://travis-ci.org/zopyx/zopyx.plone.persistentlogger.svg?branch=master



Author
------
| Andreas Jung/ZOPYX
| Hundskapfklinge 33
| D-72074 Tuebingen, Germany
| info@zopyx.com
| www.zopyx.com


Changelog
=========

0.5.0 (2021-06-21)
------------------
- addd file_logger module with support for "loguru" based loggers

0.4.8 (2019-03-03)
------------------
- minor UI tweaks 


0.4.7 (2018-12-20)
------------------
- Python 3 compatibility

0.4.2 (2017-01-28)
------------------
-fixes

0.4.0 (2017-01-27)
------------------
- log() supports `username` as optional argument for overriding the 
  current username
- log() now accepts an optional parameter `info_url` which can either be
  a full URL or a relative URL (relative to the Plone portal root) that will
  be displayed within the logger table under the new column `Info`

0.3.6 (2016-07-15)
------------------
- minor CSS fixes

0.3.5 (2016-04-25)
------------------
- update docs 

0.3.4 (2016-04-22)
------------------
- added preliminary toolbar icon

0.3.2 (2016-04-20)
------------------
- added browser layers
- added 'demo' profile for @@logger-demo view for creating
  some demo logger entries

0.3.1 (2016-04-20)
------------------
- fixes

0.3.0 (2016-04-20)
------------------
- full Plone 5 compatibility
- switched from DataTables.net to jsGrid


0.2.6 (2016-03-18)
------------------
- i18n_domain missing in configure.zcml

0.2.4 (2016-02-02)
------------------
- minor fixes

0.2.3 (2015-09-23)
------------------

- some unittest cleanup

0.2.2 (2015-09-23)
------------------
- log entries now store the original ``details`` value directly 
  as entry key ``details_raw`` in addition to the pretty-printed
  representation  in ``details``. Note that ``details`` must be 
  Python pickable.


0.2.1 (2015-09-17)
------------------
- changed action permission for viewing the persistent log

0.2.0 (2015-09-10)
------------------

- bugfixes, code cleanup
- added "Persistent log" object action


0.1.0 (2015-08-31)
------------------

- initial release

