diff --git a/logstash/formatter.py b/logstash/formatter.py index 2b5d618..a3aafa3 100644 --- a/logstash/formatter.py +++ b/logstash/formatter.py @@ -84,6 +84,7 @@ def serialize(cls, message): else: return bytes(json.dumps(message, default=str), 'utf-8') + class LogstashFormatterVersion0(LogstashFormatterBase): version = 0 @@ -100,6 +101,7 @@ def format(self, record): '@type': self.message_type, '@fields': { 'levelname': record.levelname, + 'levelno': record.levelno, 'logger': record.name, }, } @@ -129,6 +131,7 @@ def format(self, record): # Extra Fields 'level': record.levelname, + 'levelno': record.levelno, 'logger_name': record.name, }