Logging GELF
A python logging bundle to send logs using GELF. This is a rewrote of Djehouty
Quickstart
First, install logging-gelf using pip:
pip install -U logging-gelf
The following example shows how to send log in Graylog TCP input
import logging
from logging_gelf.formatters import GELFFormatter
from logging_gelf.handlers import GELFTCPSocketHandler
logger = logging.getLogger("gelf")
logger.setLevel(logging.DEBUG)
handler = GELFTCPSocketHandler(host="127.0.0.1", port=12201)
handler.setFormatter(GELFFormatter(null_character=True))
logger.addHandler(handler)
logger.debug("hello !")
Documentation
Logging adapter, extra, custom schema and many other stuff are available in the full documentation available at http://logging-gelf.readthedocs.io/ .
Requirements
Python >= 3.3
Project Links
License
Licensed under BSD 3-Clause License or https://opensource.org/licenses/BSD-3-Clause.
Metadata
Release files for logging-gelf 0.0.32
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 |
|---|---|---|---|---|
| logging-gelf-0.0.32.tar.gz | 11.0 kB | Without provenance | Details for logging-gelf-0.0.32.tar.gz |
Release files / logging-gelf-0.0.32.tar.gz
| Download URL | logging-gelf-0.0.32.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28ef1f425495831e7838f3407e8192e93dc5a623c6c0b8f33542329a7d16c6b8
|
|
BLAKE2b-256 checksum How to use checksums |
4c60ac333a39d69aa097aedad2cac6f90978fad197e3097095de8306c11416f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Security for logging-gelf 0.0.32
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.