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_handler
# 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")
handler = combilog_handler.loghandler.CombilogHandler(aggregator_url=url, service_secret=secret)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
handler.setFormatter(formatter)
logger.addHandler(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.9.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for combilog_handler-1.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b76c35c72ee2f58def14aa320e5234ebcd1be3ccd148c7a7e959b688b3a83b4c |
|
MD5 | 3e4d623a1f4ebdd6a6d2db40845baca2 |
|
BLAKE2b-256 | ba6cb4c185389267135d4ae20acfc299790dacb6b9eefbced07eac1acba85d77 |