Open Bug 460075 Opened 16 years ago Updated 2 years ago

Consolidate logging, support fine-grained logging

Categories

(Calendar :: General, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: dbo, Unassigned)

References

Details

We currently have at least two logging mechanisms in the code:
- calUtils.js' function LOG()
- calWcapUtils.js' function log()

Moreover we've more and more code logging, bloating the console if calendar.debug.log or calendar.debug.log.verbose is set. This makes it increasingly harder to read the log.

I think we need to
- consolidate and find a new API
- have a look at what stock mozilla platform offers
- add support for scoped/fine-grained logging, i.e. that users can switch on logging for specific code areas only, like e.g. "itip, wcap".
- add support for file logging (wcap's logging code may be recycled)
Flags: wanted-calendar1.0+
- add support for different log levels, e.g. from 1 (basic) to 5 (verbose) like "itip:5"
See bug 451283 and bug 450631.  We're planning on having log4moz available as part of Thunderbird, either as part of log4moz in toolkit or in mailnews.
adding dmose, because i know he cares.
Depends on: 450631
OS: Mac OS X → All
Hardware: x86 → All
Flags: wanted-calendar1.0+ → blocking-calendar1.0+
Whiteboard: [not needed beta][no l10n impact]
I don't think this is a 1.0 blocker.
Agreed, not that important!
Flags: blocking-calendar1.0+
Whiteboard: [not needed beta][no l10n impact]
If this should be of use for calendar and its providers this should depend on bug 451283, shouldn't it?
Calendar is not only used in Thunderbird/Lightning but also in Seamonkey and probably others.
See Also: → 716410

Overall, calendar logging should also move over to using console.createInstance, and not be the strange global it is atm. See 944367.
https://searchfox.org/comm-central/rev/a3f0581ca2fcd95e6c32828f583ebfae5487c2ec/calendar/base/modules/calUtils.jsm#47
For getting familiar with the codebase, going through and fixing the logging let's one see a lot.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.