Skip to content

Commit 05ad9a6

Browse files
committed
LogtailHandler: Do not expect "host" parameter to include protocol
1 parent 974a37a commit 05ad9a6

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

logtail/handler.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from .uploader import Uploader
1010
from .frame import create_frame
1111

12-
DEFAULT_HOST = 'https://in.logs.betterstack.com'
12+
DEFAULT_HOST = 'in.logs.betterstack.com'
1313
DEFAULT_BUFFER_CAPACITY = 1000
1414
DEFAULT_FLUSH_INTERVAL = 1
1515
DEFAULT_CHECK_INTERVAL = 0.1
@@ -32,7 +32,10 @@ def __init__(self,
3232
level=logging.NOTSET):
3333
super(LogtailHandler, self).__init__(level=level)
3434
self.source_token = source_token
35-
self.host = host
35+
if host.startswith('https://') or host.startswith('http://'):
36+
self.host = host
37+
else:
38+
self.host = "https://" + host
3639
self.context = context
3740
self.pipe = queue.Queue(maxsize=buffer_capacity)
3841
self.uploader = Uploader(self.source_token, self.host)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from setuptools import setup
44

55

6-
VERSION = '0.3.2'
6+
VERSION = '0.3.3'
77
ROOT_DIR = os.path.dirname(__file__)
88

99
REQUIREMENTS = [

0 commit comments

Comments
 (0)