Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Commit 48c4a2d

Browse files
oschulzSamgkreuzer
authored andcommitted
fixed bug. add prefix for extra fields while init Formatter
1 parent 6712e20 commit 48c4a2d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

logstash_async/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This software may be modified and distributed under the terms
44
# of the MIT license. See the LICENSE file for details.
55

6-
__version__ = '2.3.0'
6+
__version__ = '2.3.1'
77

88
# When using an in-memory only cache, this persists the cache through
99
# thread failures, shutdowns, and restarts.

logstash_async/formatter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ def __init__(
3838
self._tags = tags if tags is not None else []
3939
self._extra_prefix = extra_prefix
4040
self._extra = extra
41+
self._format_extra_fields()
42+
4143
self._ensure_ascii = ensure_ascii
4244
self._metadata = metadata
4345

@@ -98,8 +100,6 @@ def format(self, record):
98100
# record fields
99101
dynamic_extra_fields = self._get_record_fields(record)
100102
message.update(dynamic_extra_fields)
101-
# prepare static extra fields
102-
self._format_extra_fields()
103103
if self._extra:
104104
message.update(self._extra)
105105

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import sys
1010

1111
NAME = 'python-logstash-async'
12-
VERSION = '2.3.0'
12+
VERSION = '2.3.1'
1313

1414
here = path.abspath(path.dirname(__file__))
1515
with open(path.join(here, 'README.rst'), 'rb') as f:

0 commit comments

Comments
 (0)