question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

passing user identifiers with the python.logging handler

See original GitHub issue

you 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:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ashwoodscommented, Nov 3, 2017

I’ll merge this today, as it doesn’t hurt. wouldn’t mind a test though.

0reactions
bendogcommented, Nov 6, 2017

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found