RealRaven2000 / quickFilters

Thunderbird Add-on: quickFilters
http://quickfilters.quickfolders.org/
Other
52 stars 11 forks source link

msgsMoveCopyCompleted: remove "no destmsg!" from debug console.log #254

Closed TonyGravagno closed 3 months ago

TonyGravagno commented 3 months ago

https://github.com/RealRaven2000/quickFilters/blob/01811a251242be6966617d741a90b8db8a943c88/chrome/content/quickFilters.js#L1858

I might be looking at old docs but according to this, it's not an error/warning condition (warranting "!") if aDestMsgs is null.

Currently, if the imap move/copy happens strictly online (essentially, not user-initiated), then aDestMsgs will be null.

So perhaps rather than "no destmsg!", maybe empty string? 🥲 🙏

Reason: It looks like an error/warning message and draws unwarranted attention during debugging.

I don't think it's worthwhile here to check if aDestMsg is erroneously null or empty when using POP3 or otherwise when that condition wouldn't be valid. So this seems like a dirt-simple string change.

RealRaven2000 commented 3 months ago

So perhaps rather than "no destmsg!", maybe empty string? 🥲 🙏

Reason: It looks like an error/warning message and draws unwarranted attention during debugging.

we can change the wording. But real warnings will be logged as warnings (with a yellow triangle) not just with text that has an explanation mark. also note that it only shows up if we enable the msgMove debug switch, so it is normally not shown.

RealRaven2000 commented 3 months ago

Here is a build that removes the "no destmsg!" and instead will display "n/a". Note that any line that starts with quickFilters.Util.logDebugOptional( uses a filter as first argument which enables a bunch of optional logging - so this is only displayed if both debug mode is active and one of the special options listed in quickFilter-prefs.js is active.

in the debug log these entries also display within brackets what option triggered then in their heading.

quickFilters-wx-6.5.2pre2.zip

current list of debug options - note these are all set to false by default as we do not want to spam error console unnecessarily. At the moment they are accessible via right-click but I want to switch to a cogwheel for all about:config settings in the future like I did in QuickFolders and SmartTemplates.

pref("extensions.quickfilters.debug", false);
pref("extensions.quickfilters.debug.assistant", false);
pref("extensions.quickfilters.debug.buildFilter", false);
pref("extensions.quickfilters.debug.clipboard", false);
pref("extensions.quickfilters.debug.createFilter", false);
pref("extensions.quickfilters.debug.createFilter.refreshHeaders", false);
pref("extensions.quickfilters.debug.default", true);
pref("extensions.quickfilters.debug.dnd", false);
pref("extensions.quickfilters.debug.events", false);
pref("extensions.quickfilters.debug.events.keyboard", false);
pref("extensions.quickfilters.debug.filters", false);
pref("extensions.quickfilters.debug.filterList",false);
pref("extensions.quickfilters.debug.filterSearch",false);
pref("extensions.quickfilters.debug.filterSearch.detail",false);
pref("extensions.quickfilters.debug.getSourceFolder", false);
pref("extensions.quickfilters.debug.identities", false);
pref("extensions.quickfilters.debug.listeners", false);
pref("extensions.quickfilters.debug.merge", false);
pref("extensions.quickfilters.debug.merge.detail", false);
pref("extensions.quickfilters.debug.nostalgy", false);
pref("extensions.quickfilters.debug.notifications", false);
pref("extensions.quickfilters.debug.msgMove",false);
pref("extensions.quickfilters.debug.msgMove.detail",false);
pref("extensions.quickfilters.debug.replaceReservedWords",false);
pref("extensions.quickfilters.debug.template.multifrom", false);
pref("extensions.quickfilters.debug.template.custom", false);
pref("extensions.quickfilters.debug.premium", false);
pref("extensions.quickfilters.debug.premium.licenser", false);
pref("extensions.quickfilters.debug.premium.rsa", false);

pref("extensions.quickfilters.debug.functions", false);
pref("extensions.quickfilters.debug.mime", false);
pref("extensions.quickfilters.debug.mime.split", false);
RealRaven2000 commented 3 months ago

Fixed in 6.5.2 - Published 09/08/2024