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.loghandler
# 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")
combilog_handler = combilog.loghandler.CombilogHandler(url, secret)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
combilog_handler.setFormatter(formatter)
logger.addHandler(combilog_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.5.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for combilog_handler-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfab4a5e5bbb1680b74aa3fe35b227af66b12b715ce0226fb08b1a7f9d290610 |
|
MD5 | 086b5a5f94c3c6e519eef28a5a6dc09e |
|
BLAKE2b-256 | f0c61e02e8bc3867fd4c68be89b67f90c5af041802a13c89d74f2b40ca452694 |