Ticket #3546 enhancement new
Add custom time zone support to twisted.log.FileLogObserver
|Reported by:||zseil||Owned by:||zseil|
(diff, github, buildbot, log)
|Author:||exarkun, zseil||Launchpad Bug:|
This patch adds a new method getTimezoneInfo to twisted.log.FileLogObserver, which can be overwritten to write logs in arbitrary local time. It also converts all time manipulation in twisted.log.FileLogObserver to only use datetime objects. This also means that the "%f" format character can be used in FileLogObserver.timeFormat when running on Python 2.6 to gain microsecond resolution in log entries.
However, the patch does double the execution time of FileLogObserver.formatTime with the default format. I had great time writing it, but you decide if it is actually useful :).