Logmancer Documentation
Logmancer is an advanced logging and monitoring solution 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 by level, source, timestamp, and more
🔒 Sensitive Data Masking – Automatically mask passwords and tokens
📨 Notifications – Email, Slack, Telegram integration
Quick Start
Installation:
pip install django-logmancer
Add to your settings.py:
INSTALLED_APPS = [
# ... your apps
'logmancer',
]
MIDDLEWARE = [
# ... your middleware
'logmancer.middleware.DBLoggingMiddleware',
]
LOGMANCER = {
'ENABLE_MIDDLEWARE': True,
'AUTO_LOG_EXCEPTIONS': True,
}
Run migrations:
python manage.py migrate logmancer
Start logging:
from logmancer.utils import LogEvent
LogEvent.info("User login successful")
LogEvent.error("Payment failed", meta={"user_id": 123})
LogEvent.info("Payment successful", notify=True)
Table of Contents
User Guide
API Reference
Additional