> Provide an endpoint to receive logs and push them to a configurable django logger
Usage
Installation
Install the package:
pip install django-logging-endpoint
Install the application by adding it to the INSTALLED_APPS setting:
INSTALLED_APPS += ('logging_endpoint',)Set the logger name, if you want to send the messages to a specific one:
LOGGING_ENDPOINT_LOGGER = 'LoggingEndpoint'
Set the log message handler function, if you want to customize the parsing of your log messages:
LOGGING_ENDPOINT_MESSAGE_HANDLER = 'logging_endpoint.message_handler.default_handler'
Add the url to your urls.py:
from django.conf.urls import include urlpatterns += url(r'^logs', include('logging_endpoint.urls'))
Endpoints
root
The root endpoint of django-logging-endpoint receives a json message
with the logs to be sent to the configured logger:
{
'message': 'my log message',
'logger': 'user interaction',
'loglevel': 'error',
'timestamp': '2020-01-01T12:00Z'
}
By default, a list of logs can be received and will be expanded to the Django logger. See the documentation’s settings chapter for more information on that.
Development
Makefile
This project uses a Makefile for various tasks. Some of the available tasks are listed below.
make clean - Clean build artifacts out of your project
make test - Run Tests
make plain-test - Run Tests without rebuilding the project
make sdist - Build a Python source distribution
make docs - Build the Sphinx documentation
make lint - Get a codestyle report about your code
make plain-lint - Get a codestyle report without rebuilding the project
make - Equivalent to make test lint docs sdist
Metadata
Release files for django-logging-endpoint 1.0.4
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-logging-endpoint-1.0.4.tar.gz | 197.5 kB | Without provenance | Details for django-logging-endpoint-1.0.4.tar.gz |
Release files / django-logging-endpoint-1.0.4.tar.gz
| Download URL | django-logging-endpoint-1.0.4.tar.gz |
|---|---|
| Size | 197.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af47a93a12bfd3097e8a0ae677368ba17cd9ce23cb8732177169462d851407fe
|
|
BLAKE2b-256 checksum How to use checksums |
bb8526bf4e6d145ca551fe4ebc7fda025fa5d44de0ca939085e1f08e2ec29d19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7
|
Security for django-logging-endpoint 1.0.4
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.