Skip to content

Instantly share code, notes, and snippets.

@javouhey
Created August 5, 2011 09:42
Show Gist options
  • Save javouhey/1127218 to your computer and use it in GitHub Desktop.
Save javouhey/1127218 to your computer and use it in GitHub Desktop.
The descriptor for a python LogHandler
In [21]: log.fogbugz('a44 %s', 'hello')
CRITICAL 2011-08-05 09:07:09,316 handler 11742 -1215838528 a44 hello
name=2fb
msg=a44 %s
<type 'str'>
CRITICAL a44 hello
record.__dict__=>{'threadName': 'MainThread', 'name': '2fb', 'thread': -1215838528, 'created': 1312528029.316421, 'process': 11742, 'processName': 'MainProcess', 'args': ('hello',), 'module': 'handler', 'filename': 'handler.py', 'levelno': 50, 'exc_text': None, 'pathname': '/var/www/BIS/django-sites/p/utils/logging/handler.py', 'lineno': 79, 'msg': 'a44 %s', 'exc_info': None, 'message': 'a44 hello', 'funcName': 'fogbugz', 'relativeCreated': 2657279.0589332581, 'levelname': 'CRITICAL', 'msecs': 316.4210319519043}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment