switch thunderbird from own log4moz.js to console.createInstance
Categories
(Thunderbird :: General, defect, P2)
Tracking
(thunderbird_esr78 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr78 | --- | wontfix |
People
(Reporter: mkmelin, Assigned: rnons)
References
(Blocks 1 open bug)
Details
Attachments
(9 files)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
patch
|
rnons
:
review+
|
Details | Diff | Splinter Review |
Reporter | ||
Updated•11 years ago
|
Comment 1•11 years ago
|
||
Reporter | ||
Comment 2•11 years ago
|
||
Reporter | ||
Comment 4•11 years ago
|
||
Comment 6•11 years ago
|
||
Updated•4 years ago
|
Reporter | ||
Comment 7•4 years ago
|
||
Mozmill isn't a concern these days.
From bug 1480327 comment 8:
I think console.createInstance is the new wizardry from a discussion I had the other day (and it is much nicer than the logging modules we have).
Assignee | ||
Comment 8•4 years ago
|
||
Reporter | ||
Updated•4 years ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/2fa306ccb441
Use ConsoleAPI to replace Log4moz in account creation. r=mkmelin
Assignee | ||
Comment 10•4 years ago
|
||
Reporter | ||
Updated•4 years ago
|
Comment 11•4 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/94f16bfc2695
Remove Log4Moz from mailWindow, FolderDisplayHelpers and FeedUtils. r=mkmelin
Reporter | ||
Comment 12•4 years ago
|
||
Causing test failures: comm/mail/test/browser/newmailaccount/browser_newmailaccount.js | uncaught exception - TypeError: console.createInstance is not a function at @chrome://messenger/content/accountcreation/util.js:67
... will backout.
Comment 13•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment 14•4 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/4ac34f448d10
Remove Log4Moz from mailWindow, FolderDisplayHelpers and FeedUtils. r=mkmelin
Assignee | ||
Comment 15•4 years ago
|
||
Comment 16•4 years ago
|
||
Was this at all tested? There is giant console spew for feeds now (trace) and it certainly doesn't work as before, meaning the pref loglevel doesn't give the desired level, ie debug or trace.
Edit: change to pref loglevel is not dynamic with the new method, as it should be, but still requires restart. Trace spew needs to be fixed.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 17•4 years ago
|
||
(In reply to alta88 from comment #16)
Was this at all tested? There is giant console spew for feeds now (trace) and it certainly doesn't work as before, meaning the pref loglevel doesn't give the desired level, ie debug or trace.
Sorry, it is fixed by D99755, the reason is Trace and Info have the same level in ConsoleInstance.
Edit: change to pref loglevel is not dynamic with the new method, as it should be, but still requires restart. Trace spew needs to be fixed.
It's dynamic in my testing. Note the level is different from log4moz: https://searchfox.org/mozilla-central/rev/c7cf087b6e1384608ca3989f042f12f7cabd0a5f/dom/console/Console.cpp#2817, and you need to capitalize it.
Assignee | ||
Comment 18•4 years ago
|
||
Comment 19•4 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/d10d28a54f07
Remove Log4Moz from newmailaccount and mailnews/base. r=mkmelin
https://hg.mozilla.org/comm-central/rev/a28a78671024
Remove Log4Moz from logHelper.js. r=mkmelin
Reporter | ||
Comment 20•4 years ago
|
||
We also have a few cases of Log.jsm usage in mail, which I think we can get rid of at the same time:
https://searchfox.org/comm-central/search?q=Log.jsm&path=mail&case=true®exp=false
Log.jsm is basically the same as Log4Moz, with a few missing features (back in the day Thunderbird was first to import that library into the code base).
Assignee | ||
Comment 21•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment 22•4 years ago
|
||
The latest 12/18 nightly shows an even bigger mess:
08:38:56.173 mail.notification: NMNS_Observe: profile-after-change MailNotificationService.jsm:73:15
08:38:56.173 Console.maxLogLevelPref used with a non-existing pref: mail.notification.loglevel
with lots of spew from that and other components now.
This change has fundamentally altered the meaning of Trace and Debug. Either all Trace now has to be All, or Trace is now Debug and Debug is now Log. I suggest you update the codebase to the latter so as to best align with the buttons in the error console.
And a loglevel pref change is not dynamic. Have you done a get messages on a feed with Warn, then changed to Debug and seen any difference? Because it doesn't wfm, on linux.
Assignee | ||
Comment 23•4 years ago
|
||
(In reply to alta88 from comment #22)
The latest 12/18 nightly shows an even bigger mess:
08:38:56.173 mail.notification: NMNS_Observe: profile-after-change MailNotificationService.jsm:73:15 08:38:56.173 Console.maxLogLevelPref used with a non-existing pref: mail.notification.loglevel
with lots of spew from that and other components now.
Yes, D100084 fixed it. The problem is when a loglevel pref is not set, it fallbacks to All. See bug 1683228.
And a loglevel pref change is not dynamic. Have you done a get messages on a feed with Warn, then changed to Debug and seen any difference? Because it doesn't wfm, on linux.
You're right, my second patch in bug 1683228 should fix it. Thanks.
Assignee | ||
Comment 24•4 years ago
|
||
Assignee | ||
Comment 25•4 years ago
|
||
Comment 26•4 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/edfcfeb3910d
Remove Log4Moz usages from gloda. r=mkmelin
Comment 27•4 years ago
|
||
This creates some very noisy output from MailNotificationService.jsm unless one sets mail.notification.loglevel to Error. Is that intentional?
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Comment 28•4 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/1a8dc8afa5a8
Remove remaining Log4moz usages and Log4moz.jsm. r=mkmelin
https://hg.mozilla.org/comm-central/rev/d7d4061c9b34
Replace all Log.jsm usages with console.createInstance. r=mkmelin
Comment 29•4 years ago
|
||
See question in comment #27:
https://searchfox.org/comm-central/search?q=this._log.info&path=MailNotificationService.jsm&case=false®exp=false
Assignee | ||
Comment 30•4 years ago
|
||
(In reply to IT Support from comment #29)
See question in comment #27:
https://searchfox.org/comm-central/search?q=this._log.info&path=MailNotificationService.jsm&case=false®exp=false
Hey, are you on the latest nightly? It's been fixed, see https://searchfox.org/comm-central/source/mailnews/mailnews.js#999, no need to set mail.notification.loglevel
by yourself.
Comment 31•4 years ago
|
||
Oops, sorry, we observed this in a local build which likely predates this change. We'll do a new build soon.
Assignee | ||
Comment 32•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment 33•4 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/a9a64b058aaa
Lowercase all loglevel pref name and remove unused log prefs. r=mkmelin
Reporter | ||
Comment 34•4 years ago
|
||
Found 2 remaining obsolete references.
Assignee | ||
Updated•4 years ago
|
Comment 35•4 years ago
|
||
Description
•