Skip to content

Commit

Permalink
Merge pull request #97 from feliixx/fix-field-skip-list
Browse files Browse the repository at this point in the history
LogstashFormatter: Move field_skip_set creation to __init__
  • Loading branch information
eht16 committed Mar 28, 2024
2 parents 49635e1 + eea419c commit 6c60c27
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion logstash_async/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class LogstashFormatter(logging.Formatter):

_basic_data_types = (type(None), bool, str, int, float)

field_skip_set = set(constants.FORMATTER_RECORD_FIELD_SKIP_LIST)
top_level_field_set = set(constants.FORMATTER_LOGSTASH_MESSAGE_FIELD_LIST)

class MessageSchema:
Expand Down Expand Up @@ -89,6 +88,8 @@ def __init__(
self._prefetch_logsource()
self._prefetch_program_name()

self.field_skip_set = set(constants.FORMATTER_RECORD_FIELD_SKIP_LIST)

# ----------------------------------------------------------------------
def _prefetch_interpreter(self):
"""Override when needed"""
Expand Down

0 comments on commit 6c60c27

Please sign in to comment.