Skip to main content

Async python logging handlers that send messages in the Graylog Extended Log Format (GELF).

Project description

AsyncGELF

Language grade: Python PyPI - Downloads PyPI

Async python logging handlers that send messages in the Graylog Extended Log Format (GELF).

List of ready to run GELF handlers

  • TCP (without TLS);
  • HTTP;

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))

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 Path to custom (self-signed) certificate in pem format for GELF HTTP input only (default: None)
  • compress Optional | Compress message before sending it to the server or not for GELF HTTP input only (default: false)

Project details


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.1.2.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

asyncgelf-0.1.2-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page