Open Bug 492620 (tb-logging) Opened 13 years ago Updated 1 year ago

better, easier logging/diagnostics for Thunderbird [meta]


(Thunderbird :: General, enhancement)

Windows XP
Not set


(Not tracked)


(Reporter: wsmwk, Unassigned)


(Depends on 19 open bugs, Blocks 1 open bug)


(Keywords: meta)

better, easier logging/diagnostics for Thunderbird

starting list:
bug 450631 We should include log4moz as a JS module for front-end and extension work
bug 451283 Adding log4moz.js to toolkit 
Bug 103865 Improve [filter] Logging - add archive capability
Bug 386218 make debug/trace logging circular and automatic
Bug 229173 Better access to POP3/SMTP logging
bug 174839 Improve Filter log display format 
bug 182481 Message Filter Log should have a search button 
bug 286723 need import error log file 
bug 47864 Include server response in NNTP logging 
bug 182459 include port number in "SMTP Connecting" log message 
Bug 311632 Get LDAP change log replication working again.

based loosely on
(In reply to comment #0)
> Bug 311632 Get LDAP change log replication working again.

Nothing to do with this bug - its a LDAP method of replication.
No longer depends on: 311632
For what it's worth, with jsctypes and some clever abuse of API, you can dynamically enable logging with the UI. Unfortunately, it all goes to one file, and NSPR doesn't log which module is logging, so you can't separate log files.

Here is the code I used:

var nspr ="");
var prlog = ctypes.StructType("PRLogModuleInfo");
    [{"name": ctypes.char.ptr},
     {"next": prlog.ptr}]);
var func = nspr.declare("PR_NewLogModule",
var setLog = nspr.declare("PR_SetLogFile",

var lm = func("");

while (!lm.isNull()) {
  if ( == 'nsSocketTransport')
    lm.contents.level = 5;
  lm =;

And, lo and behold, FF started logging nsSocketTransport to /tmp/foo.log! This does require a version of ctypes with structure support, which 1.9.2 does NOT have.

I'm not sure which bug is actually asking for UI for logging, but if anyone wanted to hack a control up for trunk TB, this should be doable...
Depends on: 480843
Depends on: 480841
Depends on: 643796
Depends on: 122213
Depends on: 697522
Blocks: 35435

bug 540763 - Add logging to imap retry code.
Bug 669212 - SMTP Log does not contain body of email 
Bug 518768 - Rationalize autosync logging
Bug 257810 - RFE Way of dynamically turning on and off pr logging (duped to bug 237326)
Bug 609675 - output version information to nspr log on Thunderbird startup or start of logging
Alias: tb-logging
Depends on: 669212, 540763, 518768, 257810, 609675
Summary: better, easier logging/diagnostics for Thunderbird → better, easier logging/diagnostics for Thunderbird [meta]
Depends on: 125825
Depends on: 408618
Depends on: 1075149
- bug 1233881 landed for gecko 46 -  Support dynamically setting log levels at runtime via prefs 
- Bug 881389 - (OneLogger) Improve Gecko's logging story'
- Bug 1174785 - Add a LogModule replacement for PRLogModuleInfo
- Bug 1174972 - Switch out mozilla logging backend
Depends on: 157413, 109343, 1222530
Depends on: 1425624
See Also: → 906663, 116702
See Also: → 1567764
Depends on: 1631919
Depends on: 944367, 716410, 716400, 1667956
Depends on: 472483
You need to log in before you can comment on or make changes to this bug.