Skip to main content

Interfaces with inbuilt python logger to send logs to combilog aggregator.

Project description

CombiLog-PythonHandler

Python package containing custom log handler to integrate with CombiLog

Installation

$ pip install combilog-handler

Usage Guide

Example usage

import logging
import combilog_handler

# Points to the Websocket Server Url hosted in the Combilog Aggregator.
url = "ws://AGG_DOMAIN:AGG_SOCKET_PORT"

# Secret of the service registered in the Combilog Dashboard
secret = "MY-SPECIAL-SECRET"

logger = logging.Logger("NamedService")
handler = combilog_handler.loghandler.CombilogHandler(aggregator_url=url, service_secret=secret)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
handler.setFormatter(formatter)
logger.addHandler(handler)

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

combilog-handler-1.0.16.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

combilog_handler-1.0.16-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file combilog-handler-1.0.16.tar.gz.

File metadata

  • Download URL: combilog-handler-1.0.16.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.4

File hashes

Hashes for combilog-handler-1.0.16.tar.gz
Algorithm Hash digest
SHA256 14d1029a068f024db5a1c3ce23a08d1b8a4518126a6640a219debe932a35bbe7
MD5 46a07a31e129194ad29251f0a739fe7f
BLAKE2b-256 d67ad8bd9d0fa2f6155644d9471762c9096907450a9c123bda14531c7f77409c

See more details on using hashes here.

File details

Details for the file combilog_handler-1.0.16-py3-none-any.whl.

File metadata

  • Download URL: combilog_handler-1.0.16-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.4

File hashes

Hashes for combilog_handler-1.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 beb2a04de2773bc218a1e24bebe485a3c4759eb86f4ad7f9f81a33efb1f82ff8
MD5 80280669094e482de85523d4bf8281fc
BLAKE2b-256 e217ff8176a3f5a368a024f35325e241d0735b95b31b89cbf809affe7ba23c02

See more details on using hashes here.

Supported by

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