[tahoe-dev] collective effort to improve logging
zooko
zooko at zooko.com
Tue Sep 11 14:34:22 PDT 2007
Folks:
I just committed a patch that Arno contributed back in August.
(Sorry about the delay.)
http://allmydata.org/trac/tahoe/changeset/1192
The goal is to make log messages clear to readers of logs while also
being easy for programmers to insert calls to log().
So if anyone sees things that could be improved in logging, please
speak up.
I myself am interested in switching to ISO-8601'ish, UTC timestamps,
as I've done in the past:
http://allmydata.org/darcs.cgi/pyutil/pyutil/pyutil/time_format.py?
c=annotate
Currently our logs lines look like this:
070911-14:02:47 [Uninitialized] Stopping factory
<foolscap.negotiate.TubConnectorClientFactory object [from z23k6ynh]
[to qtjkk6cy] at 0x208e6b0>
070911-14:02:48 [Client] z23k6ynh: 'connected to qtjkk6cy'
With ISO-8601'ish, UTC timestamps, they would look like this:
2007-09-11_20:02:47 [Uninitialized] Stopping factory
<foolscap.negotiate.TubConnectorClientFactory object [from z23k6ynh]
[to qtjkk6cy] at 0x208e6b0>
2007-09-11_20:02:48 [Client] z23k6ynh: 'connected to qtjkk6cy'
Here's the classic advocacy page for ISO-8601 from Markus Kuhn:
http://www.cl.cam.ac.uk/~mgk25/iso-time.html
If people strongly prefer other (more compressed) timestamp formats
then I'll agree to use those instead of my preferred ISO-8601'ish.
I would prefer it if we would all use UTC timestamps, because I often
compare events from Tahoe logs from different timezones, and I rarely
compare events from a Tahoe node log with other events made by
different software in the same timezone. If other people feel
differently, I don't mind, but if we're going to use non-UTC
timezones in logs then I want to include the timezone indicator in
the timestamp, like this:
070911-14:02:47-06 [Uninitialized] Stopping factory
<foolscap.negotiate.TubConnectorClientFactory object [from z23k6ynh]
[to qtjkk6cy] at 0x208e6b0>
070911-14:02:48-06 [Client] z23k6ynh: 'connected to qtjkk6cy'
(See Markus Kuhn's page about timezone notation.)
Thanks!
Regards,
Zooko
More information about the tahoe-dev
mailing list