Ticket #3289: broken-logging.tac

File broken-logging.tac, 413 bytes (added by glyph, 6 years ago)

A new version of minimal.tac which opens a failsafe log to observe the traceback that the main log observer produces.

Line 
1from twisted.application.service import Application
2from twisted.python.log import startLogging, msg, FileLogObserver, addObserver
3
4application = Application("Broken logging")
5# Watch what happens from a safe distance.
6addObserver(FileLogObserver(file('failsafe.log', 'w')).emit)
7
8startLogging(file('broken.log', 'w'))
9
10msg("Hello, world!")
11from twisted.internet import reactor
12reactor.callLater(1, msg, "Tick!")