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.6.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for combilog_handler-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1979d4d775a64b53591b2219f1639613641217e3604f0529eff684a4e0005244 |
|
MD5 | c82243878d793d2944696a1d2f32667a |
|
BLAKE2b-256 | 10eda6a29548884d3a0fef83557f805e3ec9e478e75e7c58594b2ee770b3ed91 |