Ticket #3546 enhancement new
Add custom time zone support to twisted.log.FileLogObserver
| Reported by: | zseil | Owned by: | zseil |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | core | Keywords: | twistd |
| Cc: | exarkun | Branch: | branches/custom-timezone-3546-2 |
| Author: | exarkun, zseil | Launchpad Bug: |
Description
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 :).
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

