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.
Release files for django-logmancer 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_logmancer-0.1.3.tar.gz | 34.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_logmancer-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.0 kB
Release files / django_logmancer-0.1.3.tar.gz
| Download URL | django_logmancer-0.1.3.tar.gz |
|---|---|
| Size | 34.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9f378549472e6094988ea2a1def2bb3b518d01106341a36f40b6a7578c94ef9
|
|
BLAKE2b-256 checksum How to use checksums |
380ae17b45bc2ac5f69517c256baa16b1515720f74e83ddd0584aee9293646f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / django_logmancer-0.1.3-py3-none-any.whl
| Download URL | django_logmancer-0.1.3-py3-none-any.whl |
|---|---|
| Size | 20.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33a1de933be57aa761b5da86dcf862b940a0d02a70a21145b2d75f2404545661
|
|
BLAKE2b-256 checksum How to use checksums |
f625f803d9caa01ccf9d30a5afae8998708179a80d10c5a1bf6296386bb9bf7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|