Skip to content

Commit

Permalink
Updated Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
silvanm committed Oct 4, 2021
1 parent 450d2db commit 9fd28cb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ include README.md
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
recursive-exclude * *.orig

23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Requestlog
==========
Django-Requestlog
=================

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=muehlemann-popp_requestlog&metric=alert_status)](https://sonarcloud.io/dashboard?id=muehlemann-popp_requestlog) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=muehlemann-popp_requestlog&metric=coverage)](https://sonarcloud.io/dashboard?id=muehlemann-popp_requestlog)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=muehlemann-popp_requestlog&metric=alert_status)](https://sonarcloud.io/dashboard?id=muehlemann-popp_requestlog) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=muehlemann-popp_requestlog&metric=coverage)](https://sonarcloud.io/dashboard?id=muehlemann-popp_requestlog) ![PyPi](https://img.shields.io/pypi/v/django-requestlog.svg)

Middleware who logs each request with their headers and the body into the database for diagnostic purposes.
Middleware who logs each request with their headers and the body into to PostgreSQL for diagnostic purposes.


Why Logging to the database?
Expand All @@ -13,9 +13,22 @@ searched by people not having access to the server logs. Of course this only wor
for low traffic sites. And I recommend to purge those logs regularly with the provided
manage command or celery task.

What is logged?
---------------

The log is written to the table `requestlog_requestlog`.

The body field is truncated at 1024 bytes.
* timestamp
* client IP address
* django user-id
* method
* URL
* header fields
* cookies
* query parameter
* POST body
* HTTP status code
* the first 1024 of the response

Credits
-------
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setuptools.setup(
name='django-requestlog',
version='1.1.7',
version='1.1.8',
description='Middleware to log http requests to postgresql',
long_description=README,
packages=setuptools.find_packages(where="src"),
Expand Down

0 comments on commit 9fd28cb

Please sign in to comment.