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.4.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for combilog_handler-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97a991e105be526f1063110bb32f301dfcb6ae95ef4ac31d6a14bb64eb5c0d1a |
|
MD5 | 2cc66e1490d81553751f7d28b76f1086 |
|
BLAKE2b-256 | a4a7ac34b7a9af72ef72e6e3958a105ed8a68383d4a1e35f634d4a6d705c54c6 |