Skip to main content

django-eventlog stores event messages in a Django model.

Project description

.. image:: https://img.shields.io/pypi/v/django-eventlog.svg
:target: https://pypi-hypernode.com/project/django-eventlog/

.. image:: https://github.com/bartTC/django-eventlog/actions/workflows/push.yml/badge.svg
:target: https://github.com/bartTC/django-eventlog/actions/workflows/push.yml

-----

📖 **Full documentation: https://django-eventlog.readthedocs.io/**

*Compatibility Matrix:*

========= === === ==== ====
Py/Dj 3.8 3.9 3.10 3.11
========= === === ==== ====
3.2 (LTS) ✓ ✓ ✓ ✓
4.0 ✓ ✓ ✓ ✓
4.1 ✓ ✓ ✓ ✓
4.2 (LTS) ✓ ✓ ✓ ✓
========= === === ==== ====

django-eventlog
===============

django-eventlog is a very simple event logger you can use to track certain
actions in your code. Events are stored in a Django model and can be viewed
in the Django Admin.

Usage Example::

from eventlog import EventGroup

e = EventGroup() # Start a new Event Group
e.info('About to send 1000 mails.', # Trigger an Event
initiator='Mailer Daemon')
try:
# ... sending 1000 mails
e.info('All emails sent!', # Trigger an Event in the same group,
initiator='Mailer Daemon') # so they are combined in the admin.
except Exception:
e.error('There was an error sending the emails.',
initiator='Mailer Daemon')


Events can be grouped in a "Event Group" and when hovering over one item
in the admin, all events of the same group are highlighted:

.. image:: https://github.com/bartTC/django-eventlog/raw/main/docs/_static/change_list.png
:scale: 100 %

The details view of an event will list all other events of this group so you
can track the progress:

.. image:: https://github.com/bartTC/django-eventlog/raw/main/docs/_static/change_form.png
:scale: 100 %

.. note::

While looking similar, it's not intended to be a replacement for your
regular Python ``logging`` facility, rather an addition to it.

django-eventlog stores it's data in a regular database model, so each log entry
will trigger a SQL Insert. Therefore you should be careful using it in high
performance and/or high volume environments.

=========
Changelog
=========

1.2 (2023-04-28)
================

- Python 3.7 to 3.11 compatibility
- Django 3.2 to 4.2 support

1.1 (2018-05-11)
================

- Added ability to manually set a group id to make an EventGroup object
reusable through threads.

1.0 (2018-02-13)
================

- Production ready 1.0 release.
- The details Admin view now displays all events of the group with an
annotated delay, so you can see the progress of the group.

0.9 (2018-02-13)
================

- Initial release.
- Django 1.8 to 2.0 compatibility.
- Python 2.7 to 3.6 compatibility.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-eventlog-1.2.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

django_eventlog-1.2-py2.py3-none-any.whl (12.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-eventlog-1.2.tar.gz.

File metadata

  • Download URL: django-eventlog-1.2.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for django-eventlog-1.2.tar.gz
Algorithm Hash digest
SHA256 9cef5b3ffa9b8710dde66ae5c44b7f3bd0b26cdfa87314affd327597fdc37d52
MD5 0f48bcd3c9f2316f77414e574cdbdc13
BLAKE2b-256 8c8cf57a95e3e57eb9656178653a33ed9c299b1cbccb958e592501c581541498

See more details on using hashes here.

File details

Details for the file django_eventlog-1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_eventlog-1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 66900e4b909b7f09b4ae32ad85958e44f83059278d48afef6ac22c0f521e3ea0
MD5 971ec0783f566ebf1dcb519973114f1a
BLAKE2b-256 cba0bb8633dd2bd0526187202c887e1470d72183ed9fbc054ad2a1a6666b4beb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page