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
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
Built Distribution
Close
Hashes for combilog_handler-1.0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41f091d8d6c12cd4cac19c5e2a6f5d754597cfa96cebb9c477df6061ef9ed8fe |
|
MD5 | d2ac9501c9e792483474b39929f73d4a |
|
BLAKE2b-256 | de8795755e63839639d67d667df05724faa00b9c3b6db67ccb6f3b87fa615271 |