Skip to main content

pygelf adaptation that work for OVH Logs Data Platform

Project description

pygelf4ovh

pygelf adaptation that work for OVH Logs Data Platform

Install

Just use pypi repository

pip install pygelf4ovh

Usage

Just add GelfOVHHandler in logging handler

#import pygelf4ovh
import pygelf4ovh
import logging
OVH_URL = 'gra2.logs.ovh.com'
OVH_PORT = 2202
OVH_TOKEN = "your ovh api token"
from pygelf4ovh import GelfOVHHandler

logger = logging.getLogger('mylog')
logger.setLevel(logging.INFO)
sh = GelfOVHHandler(host=OVH_URL,
                   port=OVH_PORT, ovh_token=OVH_TOKEN,
                   include_extra_fields=True,
                   debug=True)
logger.addHandler(sh)

# now your handler work as usual
logger.info("my info log")

Some warn

Pygelf4ovh has been only tested with python3

Release note

  • Version 0.3

    • Add some doc
  • Version 0.2

  • Version 0.1

    • Initial commit - first working version

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

pygelf4ovh-0.3.1.tar.gz (2.0 kB view details)

Uploaded Source

File details

Details for the file pygelf4ovh-0.3.1.tar.gz.

File metadata

  • Download URL: pygelf4ovh-0.3.1.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

File hashes

Hashes for pygelf4ovh-0.3.1.tar.gz
Algorithm Hash digest
SHA256 95feb5ab2c5c687eb4c75e58428d1621d3afcb3ae95b73f34a3db2ba2c03519b
MD5 4110969ee24b478e7a947a17537951c6
BLAKE2b-256 52c0c2c4621ab67b45adc9690e542ac005e3d7e6bcd8b5628226d17c0ef94a6a

See more details on using hashes here.

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