Browse Source

removed the slash from the url

opensearch
MoisesRT 8 years ago
parent
commit
62b6541f89
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      README.md
  2. +2
    -2
      logzio/handler.py

+ 2
- 2
README.md View File

@ -39,7 +39,7 @@ format={ "loggerName":"%(name)s", "functionName":"%(funcName)s", "lineNo":"%(lin
- Number of logs to keep in buffer before draining
- Time to wait before draining, regardless of the previouse setting
- Log type, for searching in logz.io (defaults to "python")
- Logz.io Listener address (defaults to "https://listener.logz.io:8071/")
- Logz.io Listener address (defaults to "https://listener.logz.io:8071")
#### Code Example
```python
@ -83,7 +83,7 @@ LOGGING = {
'level': 'INFO',
'formatter': 'json',
'token': 'token',
'url': 'https://listener.logz.io:8071/'
'url': 'https://listener.logz.io:8071'
'logs_drain_count': 10,
'logs_drain_timeout': 5,
'logzio_type': "django"


+ 2
- 2
logzio/handler.py View File

@ -24,7 +24,7 @@ class LogzioHandler(logging.Handler):
drain_lock = Lock()
def __init__(self, token, logs_drain_count=100, logs_drain_timeout=10,
logzio_type="python", url="https://listener.logz.io:8071/"):
logzio_type="python", url="https://listener.logz.io:8071"):
if token is "":
raise Exception("Logz.io Token must be provided")
@ -33,7 +33,7 @@ class LogzioHandler(logging.Handler):
self.logs_drain_count = logs_drain_count
self.logs_drain_timeout = logs_drain_timeout
self.logzio_type = logzio_type
self.url = "{0}?token={1}".format(url, token)
self.url = "{0}/?token={1}".format(url, token)
self.is_main_thread_active = lambda: any((i.name == "MainThread") and i.is_alive() for i in enumerate())


Loading…
Cancel
Save