passing user identifiers with the python.logging handler
See original GitHub issueyou can pass tags with raven’s logging handler with
log.error('error message', extra={'tags': {'server': SERVERNAME}
I haven’t been able to get user identifying details working with any of the examples, perhaps it should be handled in a similar way to the tags method.
log.error('error message', extra={'user': {'username': USERNAME, 'email': USER_EMAIL}
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
logging.handlers — Logging handlers — Python 3.11.1 ...
Returns a new instance of the StreamHandler class. If stream is specified, the instance will use it for logging output; otherwise, sys.stderr will...
Read more >Logging Cookbook — Python 3.11.1 documentation
An easy way in which you can pass contextual information to be output along with logging event information is to use the LoggerAdapter...
Read more >Logging HOWTO — Python 3.11.1 documentation
Handler objects are responsible for dispatching the appropriate log messages (based on the log messages' severity) to the handler's specified destination.
Read more >logging — Logging facility for Python — Python 3.11.1 ...
If this attribute evaluates to true, events logged to this logger will be passed to the handlers of higher level (ancestor) loggers, in...
Read more >logging.config — Logging configuration — Python 3.11.1 ...
The ids for loggers are the logger names which would be used programmatically to obtain a reference to those loggers, e.g. foo.bar.baz ....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll merge this today, as it doesn’t hurt. wouldn’t mind a test though.
I’ve been running it on a few of my production scripts, so it seems to be handling it pretty well on both py2.7 and 3.5, i wouldn’t consider this comprehensive testing