Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
1aaf6256
Commit
1aaf6256
authored
Jan 20, 2021
by
Markus Scheidgen
Committed by
Lauri Himanen
Feb 09, 2021
Browse files
Added a hash of the exception stacktrace to logstash entries.
#479
parent
e0eb4634
Changes
1
Hide whitespace changes
Inline
Side-by-side
nomad/utils/structlogging.py
View file @
1aaf6256
...
...
@@ -47,7 +47,7 @@ from contextlib import contextmanager
import
json
import
re
from
nomad
import
config
from
nomad
import
config
,
utils
def
sanitize_logevent
(
event
:
str
)
->
str
:
...
...
@@ -152,6 +152,7 @@ class LogstashFormatter(logstash.formatter.LogstashFormatterBase):
continue
elif
key
==
'exception'
:
message
[
'digest'
]
=
str
(
value
)[
-
256
:]
message
[
'exception_hash'
]
=
utils
.
hash
(
value
)
elif
key
in
[
'upload_id'
,
'calc_id'
,
'mainfile'
]:
key
=
'nomad.%s'
%
key
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment