Async python logging handlers that send messages in the Graylog Extended Log Format (GELF).
Project description
AsyncGELF
Async python logging handlers that send messages in the Graylog Extended Log Format (GELF).
List of ready to run GELF handlers
- TCP (with and without TLS);
- HTTP (with and without TLS);
- UDP
Get AsyncGELF
pip install asyncgelf
Usage
GELF TCP
import asyncio
import asyncgelf
async def main(message):
handler = asyncgelf.GelfTcp(
host='127.0.0.1',
)
await handler.tcp_handler(message)
asyncio.run(main(message))
GELF HTTP
import asyncio
import asyncgelf
async def main(message):
handler = asyncgelf.GelfHttp(
host='127.0.0.1',
)
await handler.http_handler(message)
asyncio.run(main(message))
GELF UDP
import asyncio
import asyncgelf
async def main(message):
handler = asyncgelf.GelfUdp(
host='127.0.0.1',
)
await handler.udp_handler(message)
asyncio.run(main(message))
Available params
host
Requaried | Graylog server address;port
Optional | Graylog input port (default: 12201);gelf_version
Optional | GELF spec version (default: 1.1)level
Optional | The level equal to the standard syslog levels (default: 1);scheme
Optional | HTTP Scheme for GELF HTTP input only (default: http);tls
Optional | Path to custom (self-signed) certificate in pem format (default: None)compress
Optional | Compress message before sending it to the server or not (default: False)debug
Optional | Additional information in error log (default: False)
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
asyncgelf-0.2.0.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for asyncgelf-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4e5abe55e47441ad183ed20b2a1560c1a88cf7566dda392ecd13e69bf6f7fe8 |
|
MD5 | 7773edadb52b8f6ccb486946f16df592 |
|
BLAKE2b-256 | bb857c0848796a89b75b8248e57a2132cd36ec9b1aab20bd9d9bbd42594a5d06 |