diff --git a/nomad/utils/structlogging.py b/nomad/utils/structlogging.py index 3cd4d85ba4e90b837d2be650e1cb8c6d9420d017..905cbde40b4a38339e7a941fd1730b7584c5b011 100644 --- a/nomad/utils/structlogging.py +++ b/nomad/utils/structlogging.py @@ -109,7 +109,7 @@ class LogstashFormatter(logstash.formatter.LogstashFormatterBase): message = { '@timestamp': self.format_timestamp(record.created), '@version': '1', - 'event': structlog['event'], + 'event': structlog.get('event', 'unknown event'), 'host': self.host, 'path': record.pathname, 'tags': self.tags,