Changeset 458:997c2d633f6d
- Timestamp:
- 08/01/08 19:59:27
(5 months ago)
- Author:
- "Brian Warner <warner@lothar.com>"
- branch:
- default
- Message:
make LogFileObserver? more useful, don't do addSystemEventTrigger in init
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r457 |
r458 |
|
| 1 | 1 | 2008-08-01 Brian Warner <warner@lothar.com> |
|---|
| | 2 | |
|---|
| | 3 | * foolscap/logging/log.py (LogFileObserver): make these more |
|---|
| | 4 | useful, by not doing the addSystemEventTrigger in __init__ |
|---|
| | 5 | (LogFileObserver.stop_on_shutdown): do it here instead |
|---|
| | 6 | (FLOGFILE): when using $FLOGFILE, add call to stop_on_shutdown |
|---|
| 2 | 7 | |
|---|
| 3 | 8 | * foolscap/logging/gatherer.py (GathererService.do_rotate): oops, |
|---|
| r440 |
r458 |
|
| 363 | 363 | }} |
|---|
| 364 | 364 | pickle.dump(header, self._logFile) |
|---|
| | 365 | |
|---|
| | 366 | def stop_on_shutdown(self): |
|---|
| 365 | 367 | from twisted.internet import reactor |
|---|
| 366 | 368 | reactor.addSystemEventTrigger("after", "shutdown", self._stop) |
|---|
| … | … | |
| 392 | 394 | _floglevel = int(os.environ.get("FLOGLEVEL", str(OPERATIONAL))) |
|---|
| 393 | 395 | lfo = LogFileObserver(_flogfile, _floglevel) |
|---|
| | 396 | lfo.stop_on_shutdown() |
|---|
| 394 | 397 | theLogger.addObserver(lfo.msg) |
|---|
| 395 | 398 | #theLogger.set_generation_threshold(UNUSUAL, "foolscap.negotiation") |
|---|