Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit 41e1484

Browse files
luisulloaashwoods
authored andcommitted
Allow to specify user context in logging handler
1 parent 1a0d697 commit 41e1484

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

raven/handlers/logging.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
'relativeCreated', 'tags', 'message',
2626
))
2727

28+
CONTEXTUAL = frozenset(('user','culprit', 'server_name', 'fingerprint'))
29+
2830

2931
def extract_extra(record, reserved=RESERVED):
3032
data = {}
@@ -41,7 +43,7 @@ def extract_extra(record, reserved=RESERVED):
4143
continue
4244
if k.startswith('_'):
4345
continue
44-
if '.' not in k and k not in ('culprit', 'server_name', 'fingerprint'):
46+
if '.' not in k and k not in CONTEXTUAL:
4547
extra[k] = v
4648
else:
4749
data[k] = v

0 commit comments

Comments
 (0)