new timestamps #171

Closed
opened 2007-10-09 17:24:01 +00:00 by zooko · 3 comments
zooko commented 2007-10-09 17:24:01 +00:00
Owner

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.

As per [e-mail discussion](http://allmydata.org/pipermail/tahoe-dev/2007-September/000145.html), we want to make ISO-8601'ish, UTC, timestamps with "Z" appended to show that they are UTC, with milliseconds precision.
tahoe-lafs added the
code
minor
enhancement
0.6.0
labels 2007-10-09 17:24:01 +00:00
tahoe-lafs added this to the 0.6.1 milestone 2007-10-09 17:24:01 +00:00
warner commented 2007-10-11 09:14:33 +00:00
Author
Owner

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.

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.
warner commented 2007-10-11 09:25:55 +00:00
Author
Owner

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
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](wiki/FileLogObserver).formatTime to fix these. So still to do: * add milliseconds * make it UTC instead of localtime
warner commented 2007-10-12 00:32:48 +00:00
Author
Owner

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.

ok, I figured out how to add milliseconds and the "Z" suffix, and make it emit UTC. I create a new [FileLogObserver](wiki/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.
tahoe-lafs added the
fixed
label 2007-10-12 00:32:48 +00:00
warner closed this issue 2007-10-12 00:32:48 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac-2024-07-25#171
No description provided.