Skip to content

Commit f0e0b32

Browse files
committed
Bumped v0.7.1
Signed-off-by: Vishal Rana <vr@labstack.com>
1 parent 463337d commit f0e0b32

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

labstack/log.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def excepthook(type, value, trace):
2323
sys.__excepthook__(type, value, trace)
2424
sys.excepthook = excepthook
2525

26-
def _dispatch(self, entry):
26+
def _write(self, entry):
2727
r = requests.post(API_URL + self.path, auth=self.interceptor, data=json.dumps(entry))
2828
if not 200 <= r.status_code < 300:
2929
data = r.json()
@@ -51,11 +51,15 @@ def _log(self, level, **kwargs):
5151
if level < self.level:
5252
return
5353

54+
# Log fields
5455
kwargs['time'] = arrow.now().format('YYYY-MM-DDTHH:mm:ss.SSSZ')
5556
kwargs['level'] = level.name
57+
for k, v in self.fields.items():
58+
kwargs[k] = v
5659

60+
# Write log
5761
try:
58-
self._dispatch(kwargs)
62+
self._write(kwargs)
5963
except LogError as err:
6064
print('log error: code={}, message={}'.format(err.code, err.message))
6165

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='labstack',
5-
version='0.7.0',
5+
version='0.7.1',
66
description='Official Python client library for the LabStack platform',
77
long_description='`<https://github.com/labstack/labstack-python>`_',
88
keywords='labstack cube email log mqtt store',

0 commit comments

Comments
 (0)