logging: lazy representation, interpolation, formatting, etc. #56

Closed
opened 2007-05-25 19:56:18 +00:00 by zooko · 1 comment

In Mojo Nation's and Mnet's logging system, you could pass a format string and arguments, like this:

log("A %s had a %s, leading to a %s.", myplate, eggsplosion, mess)

And the logging system would invoke formatstr % args only if the log message was interesting enough to write to the log file. If it was not going to be written, then the logging system lazily avoided formatting it.

I would like for Tahoe's logging system to have such a feature.

See also ticket #57.

In Mojo Nation's and Mnet's logging system, you could pass a format string and arguments, like this: ``` log("A %s had a %s, leading to a %s.", myplate, eggsplosion, mess) ``` And the logging system would invoke `formatstr % args` *only* if the log message was interesting enough to write to the log file. If it was not going to be written, then the logging system lazily avoided formatting it. I would like for Tahoe's logging system to have such a feature. See also ticket #57.
zooko added the
code
minor
enhancement
0.2.0
labels 2007-05-25 19:56:18 +00:00
warner added this to the undecided milestone 2007-07-12 19:02:15 +00:00
warner added
code-nodeadmin
and removed
code
labels 2007-08-14 18:59:13 +00:00
warner modified the milestone from eventually to undecided 2008-06-01 20:53:30 +00:00
Author

This is super thoroughly fixed by foolscap logging, which not only doesn't interpolate the arguments into a string until the last possible moment, but which also has a bunch of other features to minimize the network and CPU load of running logging when you're not actually looking at the logs.

This is super thoroughly fixed by foolscap logging, which not only doesn't interpolate the arguments into a string until the last possible moment, but which also has a bunch of other features to minimize the network and CPU load of running logging when you're not actually looking at the logs.
zooko added the
fixed
label 2009-12-13 04:06:12 +00:00
zooko closed this issue 2009-12-13 04:06:12 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

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