Last Comment Bug 492620 - (tb-logging) better, easier logging/diagnostics for Thunderbird [meta]
: better, easier logging/diagnostics for Thunderbird [meta]
Status: NEW
: meta
Product: Thunderbird
Classification: Client Software
Component: General (show other bugs)
: Trunk
: x86 Windows XP
-- enhancement (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
Depends on: 47864 103865 174839 182459 182481 229173 286723 386218 408618 480841 518768 540763 609675 643796 669212 697522 122213 125825 257810 450631 Log.jsm 480843 1075149
Blocks: 35435
  Show dependency treegraph
Reported: 2009-05-12 12:18 PDT by Wayne Mery (:wsmwk, NI for questions)
Modified: 2016-02-04 03:38 PST (History)
8 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---


Description User image Wayne Mery (:wsmwk, NI for questions) 2009-05-12 12:18:16 PDT
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
Comment 1 User image Mark Banner (:standard8) 2009-05-12 12:28:29 PDT
(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.
Comment 2 User image Joshua Cranmer [:jcranmer] 2010-08-28 13:49:37 PDT
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...
Comment 3 User image Wayne Mery (:wsmwk, NI for questions) 2012-04-06 00:20:02 PDT

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
Comment 4 User image Wayne Mery (:wsmwk, NI for questions) 2016-01-08 19:34:12 PST
- 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

Note You need to log in before you can comment on or make changes to this bug.