Skip to content
Snippets Groups Projects
Commit 5e367190 authored by Theodore Chang's avatar Theodore Chang
Browse files

Merge branch 'tlc/pymongo-new-log-message' into 'develop'

Handle missing 'event' key in structlog by providing a default value

See merge request !2385
parents a1e88c99 881da100
Branches 2296-alias-support-for-queries
No related tags found
2 merge requests!2421Removed direct infrastructure dependency from mkdocs macros,!2385Handle missing 'event' key in structlog by providing a default value
Pipeline #244064 passed
...@@ -109,7 +109,7 @@ class LogstashFormatter(logstash.formatter.LogstashFormatterBase): ...@@ -109,7 +109,7 @@ class LogstashFormatter(logstash.formatter.LogstashFormatterBase):
message = { message = {
'@timestamp': self.format_timestamp(record.created), '@timestamp': self.format_timestamp(record.created),
'@version': '1', '@version': '1',
'event': structlog['event'], 'event': structlog.get('event', 'unknown event'),
'host': self.host, 'host': self.host,
'path': record.pathname, 'path': record.pathname,
'tags': self.tags, 'tags': self.tags,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment