.. image:: https://github.com/abdulsamet/logmancer/actions/workflows/test.yml/badge.svg?branch=main
:target: https://github.com/abdulsamet/logmancer/actions/workflows/test.yml
:alt: Test Status
.. image:: https://badge.fury.io/py/django-logmancer.svg
:target: https://badge.fury.io/py/django-logmancer
:alt: PyPI Version
.. image:: https://img.shields.io/pypi/pyversions/django-logmancer.svg
:target: https://pypi.org/project/django-logmancer/
:alt: Python Versions
.. image:: https://img.shields.io/github/license/abdulsamet/logmancer.svg
:target: https://github.com/abdulsamet/logmancer/blob/main/LICENSE
:alt: License
.. image:: https://codecov.io/github/abdulsamet/logmancer/graph/badge.svg?token=D45NERJMAI
:target: https://codecov.io/github/abdulsamet/logmancer
:alt: Code Coverage
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Black
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.
Raw data
{
"_id": null,
"home_page": null,
"name": "django-logmancer",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "django, logging, monitoring, middleware, signals",
"author": null,
"author_email": "Abdulsamet TATAR <abdulsamettatar@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/d9/fa/2ba9b0256e526e508801e1ecff736a6fd9b3cb65982f4a8e9a58844d7eab/django_logmancer-0.1.2.tar.gz",
"platform": null,
"description": ".. image:: https://github.com/abdulsamet/logmancer/actions/workflows/test.yml/badge.svg?branch=main\n :target: https://github.com/abdulsamet/logmancer/actions/workflows/test.yml\n :alt: Test Status\n\n.. image:: https://badge.fury.io/py/django-logmancer.svg\n :target: https://badge.fury.io/py/django-logmancer\n :alt: PyPI Version\n\n.. image:: https://img.shields.io/pypi/pyversions/django-logmancer.svg\n :target: https://pypi.org/project/django-logmancer/\n :alt: Python Versions\n\n.. image:: https://img.shields.io/github/license/abdulsamet/logmancer.svg\n :target: https://github.com/abdulsamet/logmancer/blob/main/LICENSE\n :alt: License\n\n.. image:: https://codecov.io/github/abdulsamet/logmancer/graph/badge.svg?token=D45NERJMAI \n :target: https://codecov.io/github/abdulsamet/logmancer\n :alt: Code Coverage\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Black\n\nLogmancer\n=========\n\nAdvanced logging and monitoring for Django applications.\n\nFeatures\n--------\n\n- **Database Logging** \u2013 Store logs in your Django database \n- **Middleware Integration** \u2013 Automatic HTTP request/response logging \n- **Django Signals** \u2013 Monitor model changes automatically \n- **Admin Interface** \u2013 Beautiful Django admin integration \n- **Advanced Filtering** \u2013 Filter logs by level, source, timestamp, and more \n- **Sensitive Data Masking** \u2013 Automatically mask passwords and sensitive data \n- **Configurable** \u2013 Extensive configuration options \n- **JSON Support** \u2013 Store structured data with JSON fields \n- **Cleanup Commands** \u2013 Built-in management commands for maintenance \n\nQuick Start\n-----------\n\nInstall:\n\n::\n\n pip install django-logmancer\n\nAdd to your ``settings.py``:\n\n::\n\n INSTALLED_APPS = [\n # ... your apps\n 'logmancer',\n ]\n\n MIDDLEWARE = [\n # ... your middleware\n 'logmancer.middleware.DBLoggingMiddleware',\n ]\n\n LOGMANCER = {\n 'ENABLE_SIGNALS': True,\n 'ENABLE_MIDDLEWARE': True,\n 'LOG_LEVEL': 'INFO',\n 'EXCLUDE_PATHS': ['/admin/jsi18n/', '/static/', '/media/'],\n 'EXCLUDE_MODELS': ['logmancer.LogEntry', 'auth.Session'],\n 'MASK_SENSITIVE_DATA': ['password', 'token', 'secret', 'key'],\n 'CLEANUP_AFTER_DAYS': 30,\n }\n\nRun migrations:\n\n::\n\n python manage.py migrate logmancer\n\nManual Logging Example\n----------------------\n\n::\n\n from logmancer.utils import LogEvent\n\n LogEvent.info(\"User login successful\")\n LogEvent.error(\"Payment failed\", meta={\"user_id\": 123, \"amount\": 99.99})\n\nAdmin Interface\n---------------\n\n- Navigate to ``/admin/logmancer/logentry/``\n- Filter by level, source, timestamp, actor type\n- Search through log messages\n- View detailed metadata in JSON format\n\nLicense\n-------\n\nMIT License. See ``LICENSE`` for details.\n",
"bugtrack_url": null,
"license": null,
"summary": "Advanced logging and monitoring for Django applications",
"version": "0.1.2",
"project_urls": {
"Homepage": "https://github.com/abdulsamet/logmancer",
"Issues": "https://github.com/abdulsamet/logmancer/issues",
"Repository": "https://github.com/abdulsamet/logmancer"
},
"split_keywords": [
"django",
" logging",
" monitoring",
" middleware",
" signals"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "26ce1366446160ea8d8fcd6b380b899da1e319e5540f1d2d4413df111ce4a28e",
"md5": "100afba383cc1a3c06ea36a14090c644",
"sha256": "fcac3929ab4dcce2dcc611a2d3cc80e14cc5c1c96f0706ae969059ee838cf000"
},
"downloads": -1,
"filename": "django_logmancer-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "100afba383cc1a3c06ea36a14090c644",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 11205,
"upload_time": "2025-08-08T13:16:15",
"upload_time_iso_8601": "2025-08-08T13:16:15.201010Z",
"url": "https://files.pythonhosted.org/packages/26/ce/1366446160ea8d8fcd6b380b899da1e319e5540f1d2d4413df111ce4a28e/django_logmancer-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d9fa2ba9b0256e526e508801e1ecff736a6fd9b3cb65982f4a8e9a58844d7eab",
"md5": "8d57c85dce58f64256ef71609fe22c84",
"sha256": "4af8bb2a8d22f898f38c8809881e551e0010d3236c31eb3b671969bf8625f99f"
},
"downloads": -1,
"filename": "django_logmancer-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "8d57c85dce58f64256ef71609fe22c84",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 19309,
"upload_time": "2025-08-08T13:16:16",
"upload_time_iso_8601": "2025-08-08T13:16:16.055094Z",
"url": "https://files.pythonhosted.org/packages/d9/fa/2ba9b0256e526e508801e1ecff736a6fd9b3cb65982f4a8e9a58844d7eab/django_logmancer-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-08 13:16:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "abdulsamet",
"github_project": "logmancer",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "django-logmancer"
}