Skip to content

Instantly share code, notes, and snippets.

@mbr
Created March 14, 2012 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbr/2036228 to your computer and use it in GitHub Desktop.
Save mbr/2036228 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# coding=utf8
import logbook
handler = logbook.NullHandler(bubble=False)
handler.push_application()
logbook.info('Hello, world')
#!/usr/bin/env python
# coding=utf8
import logbook
handler = logbook.NullHandler(bubble=True)
handler.push_application()
logbook.info('Hello, world')
#!/usr/bin/env python
# coding=utf8
import logbook
handler = logbook.NullHandler()
handler.push_application()
logbook.info('Hello, world')
#!/usr/bin/env python
# coding=utf8
import logbook
logbook.info('Hello, world')
# compare: http://packages.python.org/Logbook/api/handlers.html
$ python logbook-test.py
$ python logbook-test2.py
$ python logbook-test3.py
$ python logbook-test4.py
[2012-03-14 12:45] INFO: Generic: Hello, world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment