#56 closed enhancement (fixed)

logging: lazy representation, interpolation, formatting, etc.

Reported by: zooko Owned by: warner
Priority: minor Milestone: undecided
Component: code-nodeadmin Version: 0.2.0
Keywords: logging performance Cc:
Launchpad Bug:

Description

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.

Change History (7)

comment:1 Changed at 2007-05-25T20:03:05Z by zooko

  • Owner changed from somebody to warner

comment:2 Changed at 2007-07-12T19:02:15Z by warner

  • Milestone set to undecided

comment:3 Changed at 2007-08-14T18:59:13Z by warner

  • Component changed from code to code-nodeadmin

comment:4 Changed at 2008-06-01T20:53:30Z by warner

  • Milestone changed from eventually to undecided

comment:5 Changed at 2009-12-13T02:11:21Z by davidsarah

  • Keywords performance added

comment:6 Changed at 2009-12-13T02:14:52Z by davidsarah

  • Keywords logging added

comment:7 Changed at 2009-12-13T04:06:12Z by zooko

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

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.

Note: See TracTickets for help on using tickets.