Bug 1353919 - polish log module names into consistent naming style. r=jorgk
authoraceman <acelists@atlas.sk>
Mon, 04 Dec 2017 14:10:00 +0100
changeset 29708 b2e0ad79b1b276625dc73a79c44ec08aeacacd39
parent 29707 ff694bbc2956c869faa235842d8963fa9540d6b9
child 29709 6337ad40c7d2c4dbf167c7aeb2829faefd6b356b
push id2108
push userclokep@gmail.com
push dateMon, 22 Jan 2018 17:53:55 +0000
treeherdercomm-beta@c44930d8ad9b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk
bugs1353919
Bug 1353919 - polish log module names into consistent naming style. r=jorgk
ldap/xpcom/src/nsLDAPConnection.cpp
ldap/xpcom/src/nsLDAPInternal.h
ldap/xpcom/src/nsLDAPMessage.cpp
ldap/xpcom/src/nsLDAPOperation.cpp
ldap/xpcom/src/nsLDAPProtocolModule.cpp
ldap/xpcom/src/nsLDAPService.cpp
mailnews/addrbook/src/nsAbOutlookDirFactory.cpp
mailnews/addrbook/src/nsAbOutlookDirectory.cpp
mailnews/addrbook/src/nsAbWinHelper.cpp
mailnews/addrbook/src/nsMapiAddressBook.cpp
mailnews/addrbook/src/nsWabAddressBook.cpp
mailnews/compose/src/nsMsgComposeService.cpp
mailnews/db/msgdb/src/nsMailDatabase.cpp
mailnews/db/msgdb/src/nsMsgDatabase.cpp
mailnews/db/msgdb/src/nsMsgOfflineImapOperation.cpp
mailnews/imap/src/nsAutoSyncManager.cpp
mailnews/imap/src/nsAutoSyncState.cpp
mailnews/imap/src/nsImapMailFolder.cpp
mailnews/imap/src/nsImapProtocol.cpp
mailnews/imap/src/nsImapServerResponseParser.cpp
mailnews/import/applemail/src/nsAppleMailImport.h
mailnews/import/outlook/src/OutlookDebugLog.h
mailnews/import/outlook/src/nsOutlookCompose.cpp
mailnews/import/outlook/src/nsOutlookImport.cpp
mailnews/import/outlook/src/nsOutlookMail.cpp
mailnews/import/outlook/src/nsOutlookSettings.cpp
mailnews/import/src/ImportDebug.h
mailnews/import/src/moz.build
mailnews/import/src/nsImportService.cpp
mailnews/import/text/src/TextDebugLog.h
mailnews/import/text/src/nsTextAddress.cpp
mailnews/import/text/src/nsTextImport.cpp
mailnews/import/vcard/src/nsVCardAddress.h
mailnews/import/winlivemail/WMDebugLog.h
mailnews/import/winlivemail/nsWMImport.cpp
mailnews/import/winlivemail/nsWMSettings.cpp
mailnews/import/winlivemail/nsWMUtils.cpp
mailnews/local/src/nsMailboxProtocol.cpp
mailnews/local/src/nsPop3Protocol.cpp
mailnews/local/src/nsPop3Sink.cpp
mailnews/mapi/mapihook/src/msgMapiHook.cpp
mailnews/mapi/mapihook/src/msgMapiImp.cpp
--- a/ldap/xpcom/src/nsLDAPConnection.cpp
+++ b/ldap/xpcom/src/nsLDAPConnection.cpp
@@ -21,17 +21,16 @@
 #include "nsILDAPErrors.h"
 #include "nsIClassInfoImpl.h"
 #include "nsILDAPURL.h"
 #include "nsIObserverService.h"
 #include "mozilla/Services.h"
 #include "nsMemory.h"
 #include "nsLDAPUtils.h"
 #include "nsProxyRelease.h"
-#include "mozilla/Logging.h"
 #include "mozilla/Attributes.h"
 
 using namespace mozilla;
 
 const char kDNSServiceContractId[] = "@mozilla.org/network/dns-service;1";
 
 // constructor
 //
--- a/ldap/xpcom/src/nsLDAPInternal.h
+++ b/ldap/xpcom/src/nsLDAPInternal.h
@@ -4,11 +4,11 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsLDAPInternal_h_
 #define nsLDAPInternal_h_
 
 #include "mozilla/Logging.h"
 
-static mozilla::LazyLogModule gLDAPLogModule("ldap");
+extern mozilla::LazyLogModule gLDAPLogModule; // defined in nsLDAPService.cpp
 
 #endif // nsLDAPInternal_h_
--- a/ldap/xpcom/src/nsLDAPMessage.cpp
+++ b/ldap/xpcom/src/nsLDAPMessage.cpp
@@ -10,17 +10,16 @@
 #include "nsDebug.h"
 #include "nsMemory.h"
 #include "nsLDAPConnection.h"
 #include "nsISupportsUtils.h"
 #include "nsLDAPBERValue.h"
 #include "nsILDAPErrors.h"
 #include "nsIClassInfoImpl.h"
 #include "nsLDAPUtils.h"
-#include "mozilla/Logging.h"
 
 NS_IMPL_CLASSINFO(nsLDAPMessage, NULL, nsIClassInfo::THREADSAFE,
                   NS_LDAPMESSAGE_CID)
 
 NS_IMPL_ADDREF(nsLDAPMessage)
 NS_IMPL_RELEASE(nsLDAPMessage)
 NS_INTERFACE_MAP_BEGIN(nsLDAPMessage)
   NS_INTERFACE_MAP_ENTRY(nsILDAPMessage)
--- a/ldap/xpcom/src/nsLDAPOperation.cpp
+++ b/ldap/xpcom/src/nsLDAPOperation.cpp
@@ -13,17 +13,16 @@
 #include "nspr.h"
 #include "nsISimpleEnumerator.h"
 #include "nsLDAPControl.h"
 #include "nsILDAPErrors.h"
 #include "nsIClassInfoImpl.h"
 #include "nsIAuthModule.h"
 #include "nsArrayUtils.h"
 #include "nsMemory.h"
-#include "mozilla/Logging.h"
 
 // Helper function
 static nsresult TranslateLDAPErrorToNSError(const int ldapError)
 {
   switch (ldapError) {
   case LDAP_SUCCESS:
     return NS_OK;
 
--- a/ldap/xpcom/src/nsLDAPProtocolModule.cpp
+++ b/ldap/xpcom/src/nsLDAPProtocolModule.cpp
@@ -17,17 +17,16 @@
 #include "nsLDAPService.h"
 #include "nsLDAPBERValue.h"
 #include "nsLDAPBERElement.h"
 #include "nsLDAPControl.h"
 #ifdef MOZ_PREF_EXTENSIONS
 #include "nsLDAPSyncQuery.h"
 #endif
 #include "ldappr.h"
-#include "mozilla/Logging.h"
 
 // use the default constructor
 //
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsLDAPConnection)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsLDAPOperation)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsLDAPMessage)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsLDAPModification, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsLDAPServer)
--- a/ldap/xpcom/src/nsLDAPService.cpp
+++ b/ldap/xpcom/src/nsLDAPService.cpp
@@ -10,20 +10,21 @@
 #include "nsLDAPOperation.h"
 #include "nsIServiceManager.h"
 #include "nsIConsoleService.h"
 #include "nsILDAPURL.h"
 #include "nsMemory.h"
 #include "nsILDAPErrors.h"
 #include "nsComponentManagerUtils.h"
 #include "nsServiceManagerUtils.h"
-#include "mozilla/Logging.h"
 
 using namespace mozilla;
 
+LazyLogModule gLDAPLogModule("LDAP");
+
 // Constants for CIDs used here.
 //
 static NS_DEFINE_CID(kLDAPConnectionCID, NS_LDAPCONNECTION_CID);
 static NS_DEFINE_CID(kLDAPOperationCID, NS_LDAPOPERATION_CID);
 
 // First we provide all the methods for the "local" class
 // nsLDAPServiceEntry.
 //
--- a/mailnews/addrbook/src/nsAbOutlookDirFactory.cpp
+++ b/mailnews/addrbook/src/nsAbOutlookDirFactory.cpp
@@ -9,17 +9,17 @@
 #include "nsEnumeratorUtils.h"
 #include "nsServiceManagerUtils.h"
 #include "nsComponentManagerUtils.h"
 #include "nsIMutableArray.h"
 #include "nsArrayEnumerator.h"
 #include "nsAbBaseCID.h"
 #include "mozilla/Logging.h"
 
-static mozilla::LazyLogModule gAbOutlookDirFactoryLog("nsAbOutlookDirFactoryLog");
+static mozilla::LazyLogModule gAbOutlookDirFactoryLog("AbOutlookDirFactory");
 
 #define PRINTF(args) MOZ_LOG(gAbOutlookDirFactoryLog, mozilla::LogLevel::Debug, args)
 
 
 NS_IMPL_ISUPPORTS(nsAbOutlookDirFactory, nsIAbDirFactory)
 
 nsAbOutlookDirFactory::nsAbOutlookDirFactory(void)
 {
--- a/mailnews/addrbook/src/nsAbOutlookDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbOutlookDirectory.cpp
@@ -20,17 +20,17 @@
 #include "prthread.h"
 #include "nsIPrefService.h"
 #include "nsIPrefBranch.h"
 #include "nsCRTGlue.h"
 #include "nsArrayUtils.h"
 #include "nsArrayEnumerator.h"
 #include "nsMsgUtils.h"
 
-static mozilla::LazyLogModule gAbOutlookDirectoryLog("nsAbOutlookDirectoryLog");
+static mozilla::LazyLogModule gAbOutlookDirectoryLog("AbOutlookDirectory");
 
 #define PRINTF(args) MOZ_LOG(gAbOutlookDirectoryLog, mozilla::LogLevel::Debug, args)
 
 nsAbOutlookDirectory::nsAbOutlookDirectory(void)
   : nsAbDirProperty()
   , mMapiData(nullptr)
   , mCurrentQueryId(0)
   , mSearchContext(-1)
--- a/mailnews/addrbook/src/nsAbWinHelper.cpp
+++ b/mailnews/addrbook/src/nsAbWinHelper.cpp
@@ -12,17 +12,17 @@
 #include "nsAbWinHelper.h"
 #include "nsMapiAddressBook.h"
 #include "nsWabAddressBook.h"
 
 #include <mapiguid.h>
 
 #include "mozilla/Logging.h"
 
-static mozilla::LazyLogModule gAbWinHelperLog("nsAbWinHelperLog");
+static mozilla::LazyLogModule gAbWinHelperLog("AbWinHelper");
 
 #define PRINTF(args) MOZ_LOG(gAbWinHelperLog, mozilla::LogLevel::Debug, args)
 
 // Small utility to ensure release of all MAPI interfaces
 template <class tInterface> struct nsMapiInterfaceWrapper
 {
     tInterface mInterface ;
 
--- a/mailnews/addrbook/src/nsMapiAddressBook.cpp
+++ b/mailnews/addrbook/src/nsMapiAddressBook.cpp
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "nsMapiAddressBook.h"
 
 #include "mozilla/Logging.h"
 
-static mozilla::LazyLogModule gMapiAddressBookLog("nsMapiAddressBookLog");
+static mozilla::LazyLogModule gMapiAddressBookLog("MAPIAddressBook");
 
 #define PRINTF(args) MOZ_LOG(gMapiAddressBookLog, mozilla::LogLevel::Debug, args)
 
 using namespace mozilla;
 
 HMODULE nsMapiAddressBook::mLibrary = NULL ;
 int32_t nsMapiAddressBook::mLibUsage = 0 ;
 LPMAPIINITIALIZE nsMapiAddressBook::mMAPIInitialize = NULL ;
--- a/mailnews/addrbook/src/nsWabAddressBook.cpp
+++ b/mailnews/addrbook/src/nsWabAddressBook.cpp
@@ -2,22 +2,22 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include <tchar.h>
 #include "nsWabAddressBook.h"
 #include "mozilla/Logging.h"
 
-static mozilla::LazyLogModule gWabAddressBookLog("nsWabAddressBookLog");
+using namespace mozilla;
+
+static LazyLogModule gWabAddressBookLog("WABAddressBook");
 
 #define PRINTF(args) MOZ_LOG(gWabAddressBookLog, mozilla::LogLevel::Debug, args)
 
-using namespace mozilla;
-
 HMODULE nsWabAddressBook::mLibrary = NULL ;
 int32_t nsWabAddressBook::mLibUsage = 0 ;
 LPWABOPEN nsWabAddressBook::mWABOpen = NULL ;
 LPWABOBJECT nsWabAddressBook::mRootSession = NULL ;
 LPADRBOOK nsWabAddressBook::mRootBook = NULL ;
 
 BOOL nsWabAddressBook::LoadWabLibrary(void)
 {
@@ -111,14 +111,8 @@ void nsWabAddressBook::AllocateBuffer(UL
 {
     mRootSession->AllocateBuffer(aByteCount, aBuffer) ;
 }
 
 void nsWabAddressBook::FreeBuffer(LPVOID aBuffer)
 {
     mRootSession->FreeBuffer(aBuffer) ;
 }
-
-
-
-
-
-
--- a/mailnews/compose/src/nsMsgComposeService.cpp
+++ b/mailnews/compose/src/nsMsgComposeService.cpp
@@ -80,17 +80,17 @@
 #define MAILNEWS_ROOT_PREF                         "mailnews."
 #define HTMLDOMAINUPDATE_VERSION_PREF_NAME         "global_html_domains.version"
 #define HTMLDOMAINUPDATE_DOMAINLIST_PREF_NAME      "global_html_domains"
 #define USER_CURRENT_HTMLDOMAINLIST_PREF_NAME      "html_domains"
 #define USER_CURRENT_PLAINTEXTDOMAINLIST_PREF_NAME "plaintext_domains"
 #define DOMAIN_DELIMITER                           ','
 
 #ifdef MSGCOMP_TRACE_PERFORMANCE
-static mozilla::LazyLogModule MsgComposeLogModule("msgcompose");
+static mozilla::LazyLogModule MsgComposeLogModule("MsgCompose");
 
 static uint32_t GetMessageSizeFromURI(const char * originalMsgURI)
 {
   uint32_t msgSize = 0;
 
   if (originalMsgURI && *originalMsgURI)
   {
     nsCOMPtr <nsIMsgDBHdr> originalMsgHdr;
--- a/mailnews/db/msgdb/src/nsMailDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMailDatabase.cpp
@@ -10,19 +10,19 @@
 #include "nsNetUtil.h"
 #include "nsMsgOfflineImapOperation.h"
 #include "nsMsgFolderFlags.h"
 #include "mozilla/Logging.h"
 #include "prprf.h"
 #include "nsMsgUtils.h"
 #include "nsIMsgPluggableStore.h"
 
-static mozilla::LazyLogModule IMAPOffline("IMAPOFFLINE");
+using namespace mozilla;
 
-using namespace mozilla;
+extern LazyLogModule IMAPOffline; // defined in nsMsgOfflineImapOperation.cpp
 
 // scope for all offine ops table
 const char *kOfflineOpsScope = "ns:msg:db:row:scope:ops:all";
 const char *kOfflineOpsTableKind = "ns:msg:db:table:kind:ops";
 struct mdbOid gAllOfflineOpsTableOID;
 
 nsMailDatabase::nsMailDatabase() : m_reparse(false)
 {
--- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp
@@ -56,17 +56,17 @@ const int32_t kMaxHdrsInCache = 512;
 // special keys
 static const nsMsgKey kAllMsgHdrsTableKey = 1;
 static const nsMsgKey kTableKeyForThreadOne = 0xfffffffe;
 static const nsMsgKey kAllThreadsTableKey = 0xfffffffd;
 static const nsMsgKey kFirstPseudoKey = 0xfffffff0;
 static const nsMsgKey kIdStartOfFake = 0xffffff80;
 static const nsMsgKey kForceReparseKey = 0xfffffff0;
 
-static LazyLogModule DBLog("MSGDB");
+static LazyLogModule DBLog("MsgDB");
 
 PRTime nsMsgDatabase::gLastUseTime;
 
 NS_IMPL_ISUPPORTS(nsMsgDBService, nsIMsgDBService)
 
 nsMsgDBService::nsMsgDBService()
 {
 }
--- a/mailnews/db/msgdb/src/nsMsgOfflineImapOperation.cpp
+++ b/mailnews/db/msgdb/src/nsMsgOfflineImapOperation.cpp
@@ -5,17 +5,17 @@
 
 #include "msgCore.h"
 #include "nsMsgOfflineImapOperation.h"
 #include "nsMsgUtils.h"
 #include "mozilla/Logging.h"
 
 using namespace mozilla;
 
-static LazyLogModule IMAPOffline("IMAPOFFLINE");
+LazyLogModule IMAPOffline("IMAPOffline");
 
 /* Implementation file */
 NS_IMPL_ISUPPORTS(nsMsgOfflineImapOperation, nsIMsgOfflineImapOperation)
 
 // property names for offine imap operation fields.
 #define PROP_OPERATION "op"
 #define PROP_OPERATION_FLAGS "opFlags"
 #define PROP_NEW_FLAGS "newFlags"
--- a/mailnews/imap/src/nsAutoSyncManager.cpp
+++ b/mailnews/imap/src/nsAutoSyncManager.cpp
@@ -23,17 +23,17 @@
 #include "mozilla/Logging.h"
 
 using namespace mozilla;
 
 NS_IMPL_ISUPPORTS(nsDefaultAutoSyncMsgStrategy, nsIAutoSyncMsgStrategy)
 
 const char* kAppIdleNotification = "mail:appIdle";
 const char* kStartupDoneNotification = "mail-startup-done";
-static LazyLogModule gAutoSyncLog("ImapAutoSync");
+LazyLogModule gAutoSyncLog("IMAPAutoSync");
 
 // recommended size of each group of messages per download
 static const uint32_t kDefaultGroupSize = 50U*1024U /* 50K */;
 
 nsDefaultAutoSyncMsgStrategy::nsDefaultAutoSyncMsgStrategy()
 {
 }
 
--- a/mailnews/imap/src/nsAutoSyncState.cpp
+++ b/mailnews/imap/src/nsAutoSyncState.cpp
@@ -15,17 +15,17 @@
 #include "nsServiceManagerUtils.h"
 #include "nsComponentManagerUtils.h"
 #include "nsIMutableArray.h"
 #include "nsArrayUtils.h"
 #include "mozilla/Logging.h"
 
 using namespace mozilla;
 
-static LazyLogModule gAutoSyncLog("ImapAutoSync");
+extern LazyLogModule gAutoSyncLog; // defined in nsAutoSyncManager.cpp
 
 MsgStrategyComparatorAdaptor::MsgStrategyComparatorAdaptor(nsIAutoSyncMsgStrategy* aStrategy, 
   nsIMsgFolder *aFolder, nsIMsgDatabase *aDatabase) : mStrategy(aStrategy), mFolder(aFolder), 
     mDatabase(aDatabase)
 {
 }
 
 /** @return True if the elements are equals; false otherwise. */
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -95,18 +95,18 @@
 #include "mozilla/Attributes.h"
 #include "nsStringStream.h"
 #include "nsIStreamListener.h"
 
 static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
 static NS_DEFINE_CID(kParseMailMsgStateCID, NS_PARSEMAILMSGSTATE_CID);
 static NS_DEFINE_CID(kCImapHostSessionList, NS_IIMAPHOSTSESSIONLIST_CID);
 
-static mozilla::LazyLogModule gAutoSyncLog("ImapAutoSync");
-static mozilla::LazyLogModule IMAP("IMAP");
+extern mozilla::LazyLogModule gAutoSyncLog; // defined in nsAutoSyncManager.cpp
+extern mozilla::LazyLogModule IMAP;         // defined in nsImapProtocol.cpp
 
 #define MAILNEWS_CUSTOM_HEADERS "mailnews.customHeaders"
 
 /*
     Copies the contents of srcDir into destDir.
     destDir will be created if it doesn't exist.
 */
 
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -52,18 +52,16 @@
 #include "nsIWindowWatcher.h"
 #include "nsCOMPtr.h"
 #include "nsMimeTypes.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsXPCOMCIDInternal.h"
 #include "nsIXULAppInfo.h"
 #include "nsSyncRunnableHelpers.h"
 
-static mozilla::LazyLogModule IMAP("IMAP");
-
 // netlib required files
 #include "nsIStreamListener.h"
 #include "nsIMsgIncomingServer.h"
 #include "nsIImapIncomingServer.h"
 #include "nsIPrefBranch.h"
 #include "nsIPrefService.h"
 #include "nsIPrefLocalizedString.h"
 #include "nsImapUtils.h"
@@ -77,16 +75,18 @@ static mozilla::LazyLogModule IMAP("IMAP
 #include "mozilla/Logging.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/SlicedInputStream.h"
 #include "nsIPrincipal.h"
 #include "nsContentSecurityManager.h"
 
 using namespace mozilla;
 
+LazyLogModule IMAP("IMAP");
+
 #define ONE_SECOND ((uint32_t)1000)    // one second
 
 #define OUTPUT_BUFFER_SIZE (4096*2) // mscott - i should be able to remove this if I can use nsMsgLineBuffer???
 
 #define IMAP_ENV_HEADERS "From To Cc Bcc Subject Date Message-ID "
 #define IMAP_DB_HEADERS "Priority X-Priority References Newsgroups In-Reply-To Content-Type Reply-To"
 #define IMAP_ENV_AND_DB_HEADERS IMAP_ENV_HEADERS IMAP_DB_HEADERS
 static const PRIntervalTime kImapSleepTime = PR_MillisecondsToInterval(60000);
@@ -5682,17 +5682,17 @@ nsresult nsImapProtocol::ChooseAuthMetho
   eIMAPCapabilityFlags serverCaps = GetServerStateParser().GetCapabilityFlag();
   eIMAPCapabilityFlags availCaps = serverCaps & m_prefAuthMethods & ~m_failedAuthMethods;
 
   MOZ_LOG(IMAP, LogLevel::Debug, ("IMAP auth: server caps 0x%" PRIx64
         ", pref 0x%" PRIx64 ", failed 0x%" PRIx64 ", avail caps 0x%" PRIx64,
         serverCaps, m_prefAuthMethods, m_failedAuthMethods, availCaps));
   MOZ_LOG(IMAP, LogLevel::Debug, ("(GSSAPI = 0x%" PRIx64 ", CRAM = 0x%" PRIx64
         ", NTLM = 0x%" PRIx64 ", MSN = 0x%" PRIx64 ", PLAIN = 0x%" PRIx64
-        ",\n  LOGIN = 0x%" PRIx64 ", old-style IMAP login = 0x%" PRIx64
+        ", LOGIN = 0x%" PRIx64 ", old-style IMAP login = 0x%" PRIx64
         ", auth external IMAP login = 0x%" PRIx64 ", OAUTH2 = 0x%" PRIx64 ")",
         kHasAuthGssApiCapability, kHasCRAMCapability, kHasAuthNTLMCapability,
         kHasAuthMSNCapability, kHasAuthPlainCapability, kHasAuthLoginCapability,
         kHasAuthOldLoginCapability, kHasAuthExternalCapability,
         kHasXOAuth2Capability));
 
   if (kHasAuthExternalCapability & availCaps)
     m_currentAuthMethod = kHasAuthExternalCapability;
--- a/mailnews/imap/src/nsImapServerResponseParser.cpp
+++ b/mailnews/imap/src/nsImapServerResponseParser.cpp
@@ -14,17 +14,17 @@
 #include "nsImapStringBundle.h"
 #include "nsImapUtils.h"
 #include "nsCRT.h"
 #include "nsMsgUtils.h"
 #include "mozilla/Logging.h"
 
 ////////////////// nsImapServerResponseParser /////////////////////////
 
-static mozilla::LazyLogModule IMAP("IMAP");
+extern mozilla::LazyLogModule IMAP; // defined in nsImapProtocol.cpp
 
 nsImapServerResponseParser::nsImapServerResponseParser(nsImapProtocol &imapProtocolConnection)
                             : nsIMAPGenericParser(),
     fReportingErrors(true),
     fCurrentFolderReadOnly(false),
     fCurrentLineContainedFlagInfo(false),
     fServerIsNetscape3xServer(false),
     fNumberOfUnseenMessages(0),
--- a/mailnews/import/applemail/src/nsAppleMailImport.h
+++ b/mailnews/import/applemail/src/nsAppleMailImport.h
@@ -6,24 +6,17 @@
 #ifndef nsAppleMailImport_h___
 #define nsAppleMailImport_h___
 
 #include "mozilla/Logging.h"
 #include "nsIImportModule.h"
 #include "nsCOMPtr.h"
 #include "nsIStringBundle.h"
 #include "nsIImportMail.h"
-
-// logging facilities
-static mozilla::LazyLogModule APPLEMAILLOGMODULE("APPLEMAILIMPORTLOG");
-
-#define IMPORT_LOG0(x)          MOZ_LOG(APPLEMAILLOGMODULE, mozilla::LogLevel::Debug, (x))
-#define IMPORT_LOG1(x, y)       MOZ_LOG(APPLEMAILLOGMODULE, mozilla::LogLevel::Debug, (x, y))
-#define IMPORT_LOG2(x, y, z)    MOZ_LOG(APPLEMAILLOGMODULE, mozilla::LogLevel::Debug, (x, y, z))
-#define IMPORT_LOG3(a, b, c, d) MOZ_LOG(APPLEMAILLOGMODULE, mozilla::LogLevel::Debug, (a, b, c, d))
+#include "ImportDebug.h"
 
 #define NS_APPLEMAILIMPL_CID \
 { 0x9117a1ea, 0xe012, 0x43b5, { 0xa0, 0x20, 0xcb, 0x8a, 0x66, 0xcc, 0x09, 0xe1 } }
 
 #define NS_APPLEMAILIMPORT_CID \
 { 0x6d3f101c, 0x70ec, 0x4e04, { 0xb6, 0x8d, 0x99, 0x08, 0xd1, 0xae, 0xdd, 0xf3 } }
 
 #define NS_APPLEMAILIMPL_CONTRACTID "@mozilla.org/import/import-appleMailImpl;1" 
deleted file mode 100644
--- a/mailnews/import/outlook/src/OutlookDebugLog.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef OutlookDebugLog_h___
-#define OutlookDebugLog_h___
-
-#ifdef NS_DEBUG
-#define IMPORT_DEBUG  1
-#endif
-
-#include "mozilla/Logging.h"
-static mozilla::LazyLogModule OUTLOOKLOGMODULE("IMPORT");  // Logging module
-
-#define IMPORT_LOG0(x)          MOZ_LOG(OUTLOOKLOGMODULE, mozilla::LogLevel::Debug, (x))
-#define IMPORT_LOG1(x, y)       MOZ_LOG(OUTLOOKLOGMODULE, mozilla::LogLevel::Debug, (x, y))
-#define IMPORT_LOG2(x, y, z)    MOZ_LOG(OUTLOOKLOGMODULE, mozilla::LogLevel::Debug, (x, y, z))
-#define IMPORT_LOG3(a, b, c, d) MOZ_LOG(OUTLOOKLOGMODULE, mozilla::LogLevel::Debug, (a, b, c, d))
-
-
-
-#endif /* OutlookDebugLog_h___ */
--- a/mailnews/import/outlook/src/nsOutlookCompose.cpp
+++ b/mailnews/import/outlook/src/nsOutlookCompose.cpp
@@ -28,17 +28,17 @@
 #include "nsIMsgAccountManager.h"
 #include "nsIMsgSend.h"
 #include "nsIMutableArray.h"
 #include "nsImportEmbeddedImageData.h"
 #include "nsNetCID.h"
 #include "nsCRT.h"
 #include "nsOutlookCompose.h"
 
-#include "OutlookDebugLog.h"
+#include "ImportDebug.h"
 
 #include "nsMimeTypes.h"
 #include "nsMsgUtils.h"
 
 #include "nsAutoPtr.h"
 #include "nsIThread.h"
 #include "nsThreadUtils.h"
 
--- a/mailnews/import/outlook/src/nsOutlookImport.cpp
+++ b/mailnews/import/outlook/src/nsOutlookImport.cpp
@@ -24,17 +24,17 @@
 #include "nsXPCOM.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIOutputStream.h"
 #include "nsIAddrDatabase.h"
 #include "nsOutlookSettings.h"
 #include "nsTextFormatter.h"
 #include "nsOutlookStringBundle.h"
 #include "nsIStringBundle.h"
-#include "OutlookDebugLog.h"
+#include "ImportDebug.h"
 #include "nsUnicharUtils.h"
 
 #include "nsOutlookMail.h"
 
 #include "MapiApi.h"
 
 class ImportOutlookMailImpl : public nsIImportMail
 {
--- a/mailnews/import/outlook/src/nsOutlookMail.cpp
+++ b/mailnews/import/outlook/src/nsOutlookMail.cpp
@@ -15,17 +15,17 @@
 #include "nsIImportFieldMap.h"
 #include "nsIImportMailboxDescriptor.h"
 #include "nsIImportABDescriptor.h"
 #include "nsIMutableArray.h"
 #include "nsOutlookStringBundle.h"
 #include "nsABBaseCID.h"
 #include "nsIAbCard.h"
 #include "mdb.h"
-#include "OutlookDebugLog.h"
+#include "ImportDebug.h"
 #include "nsOutlookMail.h"
 #include "nsUnicharUtils.h"
 #include "nsIInputStream.h"
 #include "nsIOutputStream.h"
 #include "nsIMsgPluggableStore.h"
 #include "nsIMsgHdr.h"
 #include "nsIMsgFolder.h"
 #include "nsMsgI18N.h"
--- a/mailnews/import/outlook/src/nsOutlookSettings.cpp
+++ b/mailnews/import/outlook/src/nsOutlookSettings.cpp
@@ -20,17 +20,17 @@
 #include "nsIMsgAccount.h"
 #include "nsIImportSettings.h"
 #include "nsOutlookSettings.h"
 #include "nsMsgBaseCID.h"
 #include "nsMsgCompCID.h"
 #include "nsISmtpService.h"
 #include "nsISmtpServer.h"
 #include "nsOutlookStringBundle.h"
-#include "OutlookDebugLog.h"
+#include "ImportDebug.h"
 #include "nsIPop3IncomingServer.h"
 #include "nsMsgI18N.h"
 #include <windows.h>
 #include "nsIWindowsRegKey.h"
 #include "nsComponentManagerUtils.h"
 #include "nsNativeCharsetUtils.h"
 
 class OutlookSettings {
--- a/mailnews/import/src/ImportDebug.h
+++ b/mailnews/import/src/ImportDebug.h
@@ -6,16 +6,16 @@
 #ifndef ImportDebug_h___
 #define ImportDebug_h___
 
 #ifdef NS_DEBUG
 #define IMPORT_DEBUG  1
 #endif
 
 #include "mozilla/Logging.h"
-static mozilla::LazyLogModule IMPORTLOGMODULE("IMPORT");  // Logging module
+extern mozilla::LazyLogModule IMPORTLOGMODULE;  // defined in nsImportService.cpp
 
 #define IMPORT_LOG0(x)          MOZ_LOG(IMPORTLOGMODULE, mozilla::LogLevel::Debug, (x))
 #define IMPORT_LOG1(x, y)       MOZ_LOG(IMPORTLOGMODULE, mozilla::LogLevel::Debug, (x, y))
 #define IMPORT_LOG2(x, y, z)    MOZ_LOG(IMPORTLOGMODULE, mozilla::LogLevel::Debug, (x, y, z))
 #define IMPORT_LOG3(a, b, c, d) MOZ_LOG(IMPORTLOGMODULE, mozilla::LogLevel::Debug, (a, b, c, d))
 
 #endif
--- a/mailnews/import/src/moz.build
+++ b/mailnews/import/src/moz.build
@@ -16,10 +16,14 @@ SOURCES += [
     'nsImportMailboxDescriptor.cpp',
     'nsImportMimeEncode.cpp',
     'nsImportScanFile.cpp',
     'nsImportService.cpp',
     'nsImportStringBundle.cpp',
     'nsImportTranslator.cpp',
 ]
 
+EXPORTS += [
+    'ImportDebug.h',
+]
+
 FINAL_LIBRARY = 'import'
 
--- a/mailnews/import/src/nsImportService.cpp
+++ b/mailnews/import/src/nsImportService.cpp
@@ -30,16 +30,18 @@
 #include "nsCRTGlue.h"
 #include "nsServiceManagerUtils.h"
 #include "nsComponentManagerUtils.h"
 #include "nsIMutableArray.h"
 #include "nsIArray.h"
 #include "nsIMsgSend.h"
 #include "nsMsgUtils.h"
 
+mozilla::LazyLogModule IMPORTLOGMODULE("Import");
+
 static nsIImportService *  gImportService = nullptr;
 static const char *  kWhitespace = "\b\t\r\n ";
 
 
 ////////////////////////////////////////////////////////////////////////
 
 
 nsImportService::nsImportService() : m_pModules(nullptr)
deleted file mode 100644
--- a/mailnews/import/text/src/TextDebugLog.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef TextDebugLog_h___
-#define TextDebugLog_h___
-
-#include "mozilla/Logging.h"
-static mozilla::LazyLogModule TEXTIMPORTLOGMODULE("IMPORT");  // Logging module
-
-#define IMPORT_LOG0(x)          MOZ_LOG(TEXTIMPORTLOGMODULE, mozilla::LogLevel::Debug, (x))
-#define IMPORT_LOG1(x, y)       MOZ_LOG(TEXTIMPORTLOGMODULE, mozilla::LogLevel::Debug, (x, y))
-#define IMPORT_LOG2(x, y, z)    MOZ_LOG(TEXTIMPORTLOGMODULE, mozilla::LogLevel::Debug, (x, y, z))
-#define IMPORT_LOG3(a, b, c, d) MOZ_LOG(TEXTIMPORTLOGMODULE, mozilla::LogLevel::Debug, (a, b, c, d))
-
-
-
-#endif /* TextDebugLog_h___ */
--- a/mailnews/import/text/src/nsTextAddress.cpp
+++ b/mailnews/import/text/src/nsTextAddress.cpp
@@ -13,17 +13,17 @@
 #include "nsNetUtil.h"
 #include "nsMsgI18N.h"
 #include "nsMsgUtils.h"
 #include "mdb.h"
 #include "nsIConverterInputStream.h"
 #include "nsIUnicharLineInputStream.h"
 #include "nsMsgUtils.h"
 
-#include "TextDebugLog.h"
+#include "ImportDebug.h"
 #include "plstr.h"
 #include "msgCore.h"
 
 #define kWhitespace    " \t\b\r\n"
 
 nsTextAddress::nsTextAddress()
 {
   m_LFCount = 0;
--- a/mailnews/import/text/src/nsTextImport.cpp
+++ b/mailnews/import/text/src/nsTextImport.cpp
@@ -27,17 +27,17 @@
 #include "nsIAddrDatabase.h"
 #include "nsIAbLDIFService.h"
 #include "nsAbBaseCID.h"
 #include "nsTextFormatter.h"
 #include "nsImportStringBundle.h"
 #include "nsTextAddress.h"
 #include "nsIPrefService.h"
 #include "nsIPrefBranch.h"
-#include "TextDebugLog.h"
+#include "ImportDebug.h"
 #include "nsNetUtil.h"
 #include "nsMsgUtils.h"
 
 #define TEXT_MSGS_URL "chrome://messenger/locale/textImportMsgs.properties"
 #define TEXTIMPORT_NAME                  2000
 #define TEXTIMPORT_DESCRIPTION           2001
 #define TEXTIMPORT_ADDRESS_NAME          2002
 #define TEXTIMPORT_ADDRESS_SUCCESS       2003
--- a/mailnews/import/vcard/src/nsVCardAddress.h
+++ b/mailnews/import/vcard/src/nsVCardAddress.h
@@ -1,23 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsVCardAddress_h__
 #define nsVCardAddress_h__
 
-#include "mozilla/Logging.h"
-
-static mozilla::LazyLogModule VCARDLOGMODULE("IMPORT");  // Logging module
-
-#define IMPORT_LOG0(x)          MOZ_LOG(VCARDLOGMODULE, mozilla::LogLevel::Debug, (x))
-#define IMPORT_LOG1(x, y)       MOZ_LOG(VCARDLOGMODULE, mozilla::LogLevel::Debug, (x, y))
-#define IMPORT_LOG2(x, y, z)    MOZ_LOG(VCARDLOGMODULE, mozilla::LogLevel::Debug, (x, y, z))
-#define IMPORT_LOG3(a, b, c, d) MOZ_LOG(VCARDLOGMODULE, mozilla::LogLevel::Debug, (a, b, c, d))
+#include "ImportDebug.h"
 
 class nsIAddrDatabase;
 class nsIFile;
 class nsILineInputStream;
 
 class nsVCardAddress {
 public:
   nsVCardAddress();
deleted file mode 100644
--- a/mailnews/import/winlivemail/WMDebugLog.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef WMDebugLog_h___
-#define WMDebugLog_h___
-
-#include "mozilla/Logging.h"
-static mozilla::LazyLogModule WMLOGMODULE("IMPORT");  // Logging module
-
-#define IMPORT_LOG0(x)          MOZ_LOG(WMLOGMODULE, mozilla::LogLevel::Debug, (x))
-#define IMPORT_LOG1(x, y)       MOZ_LOG(WMLOGMODULE, mozilla::LogLevel::Debug, (x, y))
-#define IMPORT_LOG2(x, y, z)    MOZ_LOG(WMLOGMODULE, mozilla::LogLevel::Debug, (x, y, z))
-#define IMPORT_LOG3(a, b, c, d) MOZ_LOG(WMLOGMODULE, mozilla::LogLevel::Debug, (a, b, c, d))
-
-
-
-#endif /* WMDebugLog_h___ */
--- a/mailnews/import/winlivemail/nsWMImport.cpp
+++ b/mailnews/import/winlivemail/nsWMImport.cpp
@@ -28,17 +28,17 @@
 #include "nsIOutputStream.h"
 #include "nsIAddrDatabase.h"
 #include "nsWMSettings.h"
 #include "nsTextFormatter.h"
 #include "nsWMStringBundle.h"
 #include "nsIStringBundle.h"
 #include "nsUnicharUtils.h"
 
-#include "WMDebugLog.h"
+#include "ImportDebug.h"
 
 class ImportWMMailImpl : public nsIImportMail
 {
 public:
   ImportWMMailImpl();
 
   static nsresult Create(nsIImportMail** aImport);
 
--- a/mailnews/import/winlivemail/nsWMSettings.cpp
+++ b/mailnews/import/winlivemail/nsWMSettings.cpp
@@ -21,17 +21,17 @@
 #include "nsIImportSettings.h"
 #include "nsWMSettings.h"
 #include "nsMsgBaseCID.h"
 #include "nsMsgCompCID.h"
 #include "nsMsgI18N.h"
 #include "nsISmtpService.h"
 #include "nsISmtpServer.h"
 #include "nsWMStringBundle.h"
-#include "WMDebugLog.h"
+#include "ImportDebug.h"
 #include "nsIPop3IncomingServer.h"
 #include "nsIImapIncomingServer.h"
 #include "nsINntpIncomingServer.h"
 #include "stdlib.h"
 #include "nsIFile.h"
 #include "nsISimpleEnumerator.h"
 #include "nsIMutableArray.h"
 #include "nsIDOMDocument.h"
--- a/mailnews/import/winlivemail/nsWMUtils.cpp
+++ b/mailnews/import/winlivemail/nsWMUtils.cpp
@@ -9,17 +9,17 @@
 #include "nsString.h"
 #include "nsWMUtils.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMNodeList.h"
 #include "nsIDOMParser.h"
 #include "nsIFileStreams.h"
 #include "nsIFile.h"
 #include "nsISimpleEnumerator.h"
-#include "WMDebugLog.h"
+#include "ImportDebug.h"
 #include "prio.h"
 
 nsresult
 nsWMUtils::FindWMKey(nsIWindowsRegKey **aKey)
 {
   nsresult rv;
   nsCOMPtr<nsIWindowsRegKey> key =
     do_CreateInstance("@mozilla.org/windows-registry-key;1", &rv);
--- a/mailnews/local/src/nsMailboxProtocol.cpp
+++ b/mailnews/local/src/nsMailboxProtocol.cpp
@@ -33,17 +33,17 @@
 #include "nsIMsgPluggableStore.h"
 #include "nsISeekableStream.h"
 #include "nsStreamUtils.h"
 
 #include "nsIMsgMdnGenerator.h"
 
 using namespace mozilla;
 
-static LazyLogModule MAILBOX("MAILBOX");
+static LazyLogModule MAILBOX("Mailbox");
 
 /* the output_buffer_size must be larger than the largest possible line
  * 2000 seems good for news
  *
  * jwz: I increased this to 4k since it must be big enough to hold the
  * entire button-bar HTML, and with the new "mailto" format, that can
  * contain arbitrarily long header fields like "references".
  *
--- a/mailnews/local/src/nsPop3Protocol.cpp
+++ b/mailnews/local/src/nsPop3Protocol.cpp
@@ -45,17 +45,17 @@
 #include "nsIProxyInfo.h"
 #include "nsCRT.h"
 #include "mozilla/Services.h"
 #include "mozilla/Logging.h"
 #include "mozilla/Attributes.h"
 
 using namespace mozilla;
 
-static mozilla::LazyLogModule POP3LOGMODULE("POP3");
+LazyLogModule POP3LOGMODULE("POP3");
 #define POP3LOG(str) "[this=%p] " str, this
 
 static int
 net_pop3_remove_messages_marked_delete(PLHashEntry* he,
                                        int msgindex,
                                        void *arg)
 {
   Pop3UidlEntry *uidlEntry = (Pop3UidlEntry *) he->value;
--- a/mailnews/local/src/nsPop3Sink.cpp
+++ b/mailnews/local/src/nsPop3Sink.cpp
@@ -38,17 +38,17 @@
 #include "nsMsgLocalCID.h"
 #include "mozilla/Services.h"
 #include "mozilla/Logging.h"
 
 /* for logging to Error Console */
 #include "nsIScriptError.h"
 #include "nsIConsoleService.h"
 
-static mozilla::LazyLogModule POP3LOGMODULE("POP3");
+extern mozilla::LazyLogModule POP3LOGMODULE; //defined in nsPop3Protocol.cpp
 #define POP3LOG(str) "sink: [this=%p] " str, this
 
 NS_IMPL_ISUPPORTS(nsPop3Sink, nsIPop3Sink)
 
 nsPop3Sink::nsPop3Sink()
 {
     m_authed = false;
     m_downloadingToTempFile = false;
--- a/mailnews/mapi/mapihook/src/msgMapiHook.cpp
+++ b/mailnews/mapi/mapihook/src/msgMapiHook.cpp
@@ -42,17 +42,17 @@
 #include "nsMsgUtils.h"
 #include "nsNetUtil.h"
 #include "mozilla/Services.h"
 #include "nsIArray.h"
 #include "nsArrayUtils.h"
 #include "nsEmbedCID.h"
 #include "mozilla/Logging.h"
 
-static mozilla::LazyLogModule MAPI("MAPI");
+extern mozilla::LazyLogModule MAPI; // defined in msgMapiImp.cpp
 
 class nsMAPISendListener : public nsIMsgSendListener
 {
 public:
 
     // nsISupports interface
     NS_DECL_THREADSAFE_ISUPPORTS
 
--- a/mailnews/mapi/mapihook/src/msgMapiImp.cpp
+++ b/mailnews/mapi/mapihook/src/msgMapiImp.cpp
@@ -31,17 +31,17 @@
 #include "nsIFileStreams.h"
 #include "nsNetCID.h"
 #include "nsMsgMessageFlags.h"
 #include "mozilla/mailnews/MimeHeaderParser.h"
 #include "mozilla/Logging.h"
 
 using namespace mozilla::mailnews;
 
-static mozilla::LazyLogModule MAPI("MAPI");
+mozilla::LazyLogModule MAPI("MAPI");
 
 CMapiImp::CMapiImp()
 : m_cRef(1)
 {
     m_Lock = PR_NewLock();
 }
 
 CMapiImp::~CMapiImp()