Ticket #3289: broken-logging.tac
| File broken-logging.tac, 413 bytes (added by glyph, 4 years ago) |
|---|
| Line | |
|---|---|
| 1 | from twisted.application.service import Application |
| 2 | from twisted.python.log import startLogging, msg, FileLogObserver, addObserver |
| 3 | |
| 4 | application = Application("Broken logging") |
| 5 | # Watch what happens from a safe distance. |
| 6 | addObserver(FileLogObserver(file('failsafe.log', 'w')).emit) |
| 7 | |
| 8 | startLogging(file('broken.log', 'w')) |
| 9 | |
| 10 | msg("Hello, world!") |
| 11 | from twisted.internet import reactor |
| 12 | reactor.callLater(1, msg, "Tick!") |
