[](https://travis-ci.org/telminov/django-time-logger)
[](https://coveralls.io/r/telminov/django-time-logger?branch=master)
Installation python package:
```
$ pip install django-time-logger
```
Add middleware into settings.py:
```
MIDDLEWARE_CLASSES = (
...
'time_logger.middleware.view_logger.ViewTimeLogger',
...
)
```
Set threshold time value in seconds into settings.py for logging view
```
LOG_VIEW_TIME = 10
```
Optional can be set mongo database for logging
```
mongoengine.connect(...)
mongoengine.register_connection('local', ...)
...
LOG_VIEW_TIME_DB_ALIAS = 'local'
```
Mysql configuration for slow queries logging. Block [mysqld] in my.cnf should contain next strings:
```
slow_query_log = 1
long_query_time = 3
log_output = TABLE
expire_logs_days = 1 - See more at: http://gurutek.biz/mysql-slow-query-logging-to-table/#sthash.FZAL94hW.dpuf
```
Set mysql configs without restart server:
```
set global log_slow_queries = 1;
set global long_query_time = 3;
set global log_output = 'TABLE';
set global expire_logs_days = 1;
set global log = 1; - See more at: http://gurutek.biz/mysql-slow-query-logging-to-table/#sthash.FZAL94hW.dpuf
```
Metadata
Release files for django-time-logger 0.0.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-time-logger-0.0.17.tar.gz | 12.8 kB | Without provenance | Details for django-time-logger-0.0.17.tar.gz |
Release files / django-time-logger-0.0.17.tar.gz
| Download URL | django-time-logger-0.0.17.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1bafada9f6df47d2692484444ee930d21027ad3ab42d1ffba895f0ef1c9f6ee
|
|
BLAKE2b-256 checksum How to use checksums |
1f8266b6d9bb62a145305b5694925e47755ef2dfd576cf450eab11410eb58a2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-time-logger 0.0.17
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.