Log view hits over time so that you know who enter this view and when.
Project description
# View Logger
ViewLogger is a simple Django app Log view hits over time so that you know who enter this view and when.
## Installation
* Install the package
```sh
pip install ViewLogger
```
* Add Application to your project's INSTALLED_APPs
```python
INSTALLED_APPS = (
'....',
'ViewLogger',
)
```
* Add `ViewLogger.middleware.ViewLoggerMiddleware` to your Middleware classes .
```python
MIDDLEWARE_CLASSES = (
'....',
'ViewLogger.middleware.ViewLoggerMiddleware',
)
```
* Run Migrations
```sh
python manage.py migrate ViewLogger
```
#### Notes
* To exempt urls add VIEWLOGGER_EXEMPTED_PATHS to your setting.py
```python
VIEWLOGGER_EXEMPTED_PATHS=["/worker",]
```
* To exempt views add VIEWLOGGER_EXEMPTED_VIEWS to your setting.py
```python
VIEWLOGGER_EXEMPTED_VIEWS=["worker",]
```
* To exempt parameters add VIEWLOGGER_EXEMPTED_PARAMETER to your setting.py
```python
VIEWLOGGER_EXEMPTED_PARAMETER=["password",]
```
* ViewLogger by dafualt log all requests (GET and POST), add VIEWLOGGER_METHODS in your setting.py to log certain method ,
```python
VIEWLOGGER_METHODS=["POST"]
```
ViewLogger is a simple Django app Log view hits over time so that you know who enter this view and when.
## Installation
* Install the package
```sh
pip install ViewLogger
```
* Add Application to your project's INSTALLED_APPs
```python
INSTALLED_APPS = (
'....',
'ViewLogger',
)
```
* Add `ViewLogger.middleware.ViewLoggerMiddleware` to your Middleware classes .
```python
MIDDLEWARE_CLASSES = (
'....',
'ViewLogger.middleware.ViewLoggerMiddleware',
)
```
* Run Migrations
```sh
python manage.py migrate ViewLogger
```
#### Notes
* To exempt urls add VIEWLOGGER_EXEMPTED_PATHS to your setting.py
```python
VIEWLOGGER_EXEMPTED_PATHS=["/worker",]
```
* To exempt views add VIEWLOGGER_EXEMPTED_VIEWS to your setting.py
```python
VIEWLOGGER_EXEMPTED_VIEWS=["worker",]
```
* To exempt parameters add VIEWLOGGER_EXEMPTED_PARAMETER to your setting.py
```python
VIEWLOGGER_EXEMPTED_PARAMETER=["password",]
```
* ViewLogger by dafualt log all requests (GET and POST), add VIEWLOGGER_METHODS in your setting.py to log certain method ,
```python
VIEWLOGGER_METHODS=["POST"]
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ViewLogger-1.5.2.tar.gz
(7.2 kB
view hashes)
Built Distribution
Close
Hashes for ViewLogger-1.5.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29e7a3ff1930289c5c8a8b7479473e689695cc39164bc4ea6196b681c27ca7a9 |
|
MD5 | f0c2ea15ff8e8ef928aa33ab0b98470e |
|
BLAKE2b-256 | f8c6899cf907ace2730f94a535f26f539d82c6d36ea4ed0de85ec22fc350d6ad |