django-deferred-filelogger
This package provides a new logging handler that defers evaluation of the filepath until a message is emitted. It uses a setting LOG_ROOT as the folder for the log files. This is useful when you don’t know the exact location of your log files when the LOGGING setting is defined - this can be the case if you have a environment specific settings file which gets imported after your core settings.
Usage
In your main settings file, configure your handlers with a filename
LOGGING = {
...
'handlers': {
'error_file': {
'level': 'INFO',
'class': 'deferred_filelogger.DeferredFilehandler',
'filename': 'errors.log',
}
},
'loggers': {
'django.request': {
'handlers': ['error_file', 'mail_admins'],
'level': 'ERROR',
'propagate': False
}
}
}
then in your environmental overrides (eg settings_local.py), specify a LOG_ROOT folder. For instance, in your test environment you might specify
LOG_ROOT = '/var/www/client/project/logs/test'
which would cause your Django errors to be logged to /var/www/client/project/logs/test/errors.log.
Metadata
Release files for django-deferred-filelogger 0.1
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-deferred-filelogger-0.1.tar.gz | 2.9 kB | Without provenance | Details for django-deferred-filelogger-0.1.tar.gz |
Release files / django-deferred-filelogger-0.1.tar.gz
| Download URL | django-deferred-filelogger-0.1.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b198e885cf2ab4e0364dd0ac499bbaa8ae2fb6bbd226bdd1256e3a50300da56b
|
|
BLAKE2b-256 checksum How to use checksums |
326d00107d06ff29d5648636932045e415dbf32b132bad2c80b68aa6fec493ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-deferred-filelogger 0.1
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.