#171 closed enhancement (fixed)

new timestamps

Reported by: zooko Owned by: warner
Priority: minor Milestone: 0.6.1
Component: code Version: 0.6.0
Keywords: Cc:
Launchpad Bug:


As per e-mail discussion, we want to make ISO-8601'ish, UTC, timestamps with "Z" appended to show that they are UTC, with milliseconds precision.

Change History (3)

comment:1 Changed at 2007-10-11T09:14:33Z by warner

  • Owner changed from somebody to warner
  • Status changed from new to assigned

I've pushed a change to get most of this. It's only lacking the milliseconds, since time.strftime doesn't provide a format character to get these. Adding milliseconds will probably require modifying the logging code some more.. I'll look at it later in the week, maybe for 0.6.1, maybe not.

comment:2 Changed at 2007-10-11T09:25:55Z by warner

oops, so it turns out that the timeFormat= option doesn't let you make the timestamp be UTC. It's always localtime. So I just removed the misleading "Z" from the end of the string. I think we'll have to override FileLogObserver?.formatTime to fix these.

So still to do:

  • add milliseconds
  • make it UTC instead of localtime

comment:3 Changed at 2007-10-12T00:32:48Z by warner

  • Resolution set to fixed
  • Status changed from assigned to closed

ok, I figured out how to add milliseconds and the "Z" suffix, and make it emit UTC. I create a new FileLogObserver? and replace any existing ones when the Node (i.e. Client) instance is created. The first few log messages (emitted by twistd before the .tac file is loaded) show up with the default Twisted format ('2007/10/11 17:26 -0700', using localtime), then they switch over to the new format when the .tac gets control.

Note: See TracTickets for help on using tickets.