diff --git a/logstash/formatter.py b/logstash/formatter.py index 2b5d618..ce0ba5a 100644 --- a/logstash/formatter.py +++ b/logstash/formatter.py @@ -79,10 +79,8 @@ def format_exception(cls, exc_info): @classmethod def serialize(cls, message): - if sys.version_info < (3, 0): - return json.dumps(message) - else: - return bytes(json.dumps(message, default=str), 'utf-8') + return json.dumps(message) + class LogstashFormatterVersion0(LogstashFormatterBase): version = 0