django-eventlog stores event messages in a Django model.
Project description
Full documentation: https://docs.elephant.house/django-eventlog/
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:
The details view of an event will list all other events of this group so you can track the progress:
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.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
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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size django_eventlog-1.1-py2.py3-none-any.whl (13.4 kB) | File type Wheel | Python version py2.py3 | Upload date | Hashes View |
Filename, size django-eventlog-1.1.tar.gz (1.2 MB) | File type Source | Python version None | Upload date | Hashes View |
Hashes for django_eventlog-1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 228a10a21b1bfd3da98fc07f4ea3c3bb63675170e6b571188ae6ba968b5b0c05 |
|
MD5 | 9fd51c31adc3e82e308779dd26c40fd2 |
|
BLAKE2-256 | 7e4dd0cf5d966b3ef690e3e18cffabf066ac095c91ba682df69e7293c08b8d04 |