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://localhost:1337"
# 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
combilog_handler-1.0.7.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for combilog_handler-1.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04cd0123f9786e8954a1c8f3591c4e041dae510630f0a6d4fa70c9544851fc3e |
|
MD5 | 5b37edb5b4e30773b6a8a4045f966f30 |
|
BLAKE2b-256 | 83482a836d5b615205adf8f7abeb4159e641b5c2b29aaf68fa4e22a181af04a5 |