Skip to content

Releases: cuongnbms/django-request-logging

v1.4

Choose a tag to compare

@cuongnbms cuongnbms released this 09 Jul 03:06

What's new

  • Test suite — added a self-contained runner (runtests.py) and tests/ covering the middleware, get_ip_client, and the remove_old_request_log command. Runs on in-memory SQLite with no extra dependencies.
  • Admin filtersRequestLogAdmin now has list_filter (method, response_code, request_at) and a date_hierarchy for easier log browsing.
  • Docs — documented that get_ip_client relies on spoofable client headers and must not be trusted for security decisions; added test-running instructions to the README.

Install: pip install git+https://github.com/cuongnb14/django-request-logging.git@v1.4#egg=django-request-logging

v1.3

Choose a tag to compare

@cuongnbms cuongnbms released this 09 Jul 02:48

Performance & maintenance

  • DB indexes: added indexes on request_at, client_ip, response_code and default -request_at ordering to speed up admin listing and log cleanup (migration 0003).
  • Cleanup command: remove_old_request_log now deletes in batches to avoid loading huge querysets into memory, validates the keep unit (d/m), and logs the number of rows removed.
  • Middleware: store GET params as a plain dict (preserving multi-value params), harden request.user access when auth middleware is absent, and remove dead code.
  • Admin: disable full result count on the list view to avoid expensive COUNT(*) on large tables.

Packaging

  • Migrated from setup.py to pyproject.toml (PEP 621), declaring the Django>=4.0 dependency and requires-python>=3.8.

Upgrade note: run python manage.py migrate request_logging to create the new indexes.

v1.2

Choose a tag to compare

@cuongnbms cuongnbms released this 03 Nov 04:12
  • Add log header
  • Add db log sampling

v1.1

Choose a tag to compare

@cuongnbms cuongnbms released this 22 Sep 11:50
  • Add command to remove old request log
  • Update admin

v1.0

Choose a tag to compare

@cuongnbms cuongnbms released this 22 Sep 10:48
update logger