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.2.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for combilog_handler-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24f51b33ada3b7b6631e5dbcf61b5e11f5a8898138005a26cd1009c306a36a2a |
|
MD5 | 9acd59ce22bb07fde97e4c36eafc6c4c |
|
BLAKE2b-256 | f14ccc9f6cc07a6c2362ade575105d93b1f05bd626c4840f81b6e948b02b8047 |