Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Example usage

```
import logging
import combilog.loghandler
import combilog_handler

# Points to the Websocket Server Url hosted in the Combilog Aggregator.
url = "ws://localhost:1337"
Expand All @@ -23,9 +23,9 @@ url = "ws://localhost:1337"
secret = "MY-SPECIAL-SECRET"

logger = logging.Logger("NamedService")
combilog_handler = combilog.loghandler.CombilogHandler(url, secret)
handler = combilog_handler.loghandler.CombilogHandler(aggregator_url=url, service_secret=secret)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
combilog_handler.setFormatter(formatter)
logger.addHandler(combilog_handler)
handler.setFormatter(formatter)
logger.addHandler(handler)

```
File renamed without changes.
6 changes: 3 additions & 3 deletions combilog/loghandler.py → combilog_handler/loghandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import asyncio
import time
from queue import Queue
from combilog.socketerror import get_closure_error
from combilog_handler.socketerror import get_closure_error


class CombilogHandler(Handler):
def __init__(self, aggreagtor_url: str, service_secret: str, logger: Logger = None):
def __init__(self, aggregator_url: str, service_secret: str, logger: Logger = None):
Handler.__init__(self)
self._aggregator_url = aggreagtor_url
self._aggregator_url = aggregator_url
self._service_secret = service_secret
self._retry_timer = threading.Timer(7, self._retry_connect)
self._message_queue = Queue()
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
long_description = fh.read()

setuptools.setup(
name="combilog-handler", # Replace with your own username
version="1.0.1",
name="combilog_handler", # Replace with your own username
version="1.0.7",
author="Lewis Cummins",
author_email="lewisjcummins@hotmail.co.uk",
description="Interfaces with inbuilt python logger to send logs to combilog aggregator.",
Expand Down