Skip to content

Instantly share code, notes, and snippets.

@abesto
Created May 21, 2014 10:27
Show Gist options
  • Save abesto/21516c5466c83b77419c to your computer and use it in GitHub Desktop.
Save abesto/21516c5466c83b77419c to your computer and use it in GitHub Desktop.
import logging
dict(filter(lambda x: x[1], [(name, [h for h in logging.getLogger(name).handlers if 'Stream' in h.__class__.__name__]) for name, logger in logging.Logger.manager.loggerDict.iteritems()]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment