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://AGG_DOMAIN:AGG_SOCKET_PORT"
# 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.8.tar.gz
(1.5 kB
view hashes)
Built Distribution
Close
Hashes for combilog_handler-1.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 024c5a2b4507d9cc68f3b8c940ed7d55af1beca74475a8262a481bbdbd740e68 |
|
MD5 | 37a15e7284db1f6deb9131e0a6300ca1 |
|
BLAKE2b-256 | 7221b51c1299e2bdbfed5157c7a6e97bf01992d857b75e075a8c6d88b01d981c |