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.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75c5b8cd4a10091bffc0946c03b27c4ac5575a5e9c51b611fe68a3fb762d5666 |
|
MD5 | 03ba6d47fa6b1b268ab82fa2037ce4f6 |
|
BLAKE2b-256 | 0858e66838c6f93a716b89bcf1e6042e5a8e52bc071f7b28b164aa22670029c5 |