Advanced logging and monitoring for Django applications
Project description
Logmancer
Advanced logging and monitoring for Django applications.
Features
Database Logging – Store logs in your Django database
Middleware Integration – Automatic HTTP request/response logging
Django Signals – Monitor model changes automatically
Admin Interface – Beautiful Django admin integration
Advanced Filtering – Filter logs by level, source, timestamp, and more
Sensitive Data Masking – Automatically mask passwords and sensitive data
Configurable – Extensive configuration options
JSON Support – Store structured data with JSON fields
Cleanup Commands – Built-in management commands for maintenance
Quick Start
Install:
pip install django-logmancer
Add to your settings.py:
INSTALLED_APPS = [
# ... your apps
'logmancer',
]
MIDDLEWARE = [
# ... your middleware
'logmancer.middleware.DBLoggingMiddleware',
]
LOGMANCER = {
'ENABLE_SIGNALS': True,
'ENABLE_MIDDLEWARE': True,
'LOG_LEVEL': 'INFO',
'EXCLUDE_PATHS': ['/admin/jsi18n/', '/static/', '/media/'],
'EXCLUDE_MODELS': ['logmancer.LogEntry', 'auth.Session'],
'MASK_SENSITIVE_DATA': ['password', 'token', 'secret', 'key'],
'CLEANUP_AFTER_DAYS': 30,
}
Run migrations:
python manage.py migrate logmancer
Manual Logging Example
from logmancer.utils import LogEvent
LogEvent.info("User login successful")
LogEvent.error("Payment failed", meta={"user_id": 123, "amount": 99.99})
Admin Interface
Navigate to /admin/logmancer/logentry/
Filter by level, source, timestamp, actor type
Search through log messages
View detailed metadata in JSON format
License
MIT License. See LICENSE for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_logmancer-0.1.1.tar.gz.
File metadata
- Download URL: django_logmancer-0.1.1.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d853f45f0cfe656f939e62d15f0ad411b96583dcd8788ce6bdc519d2bb5282e4
|
|
| MD5 |
9ad13462e70db3958df8f55eed5d5d3a
|
|
| BLAKE2b-256 |
8c1eea31d8e359d19cc196c262851b604d714824720aee3c3669aa4667e4ebf9
|
File details
Details for the file django_logmancer-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_logmancer-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21cd4ce3b19cd633895e9e984d4016b9b5a11ba8f5f2152253574ea6e91109ff
|
|
| MD5 |
f4df3b9179169a90cdd9333207a7e976
|
|
| BLAKE2b-256 |
90b51ee948e58e64d96c08b5a97facb8cc118818f19e02ffdc9a420ab4dc5e52
|