mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 10:43:24 +00:00
Bug 1563996 - Make consoleservice.logcat a static pref. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D37203 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
2a0a298b36
commit
508aad2c70
@ -781,13 +781,6 @@ pref("layout.accessiblecaret.hapticfeedback", true);
|
||||
// a smarter phone-number selection for direct-dial ActionBar action.
|
||||
pref("layout.accessiblecaret.extend_selection_for_phone_number", true);
|
||||
|
||||
// Disable sending console to logcat on release builds.
|
||||
#ifdef RELEASE_OR_BETA
|
||||
pref("consoleservice.logcat", false);
|
||||
#else
|
||||
pref("consoleservice.logcat", true);
|
||||
#endif
|
||||
|
||||
pref("browser.tabs.showAudioPlayingIcon", true);
|
||||
|
||||
pref("dom.serviceWorkers.enabled", true);
|
||||
|
@ -1054,6 +1054,20 @@ VARCACHE_PREF(
|
||||
)
|
||||
#undef PREF_VALUE
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Prefs starting with "consoleservice."
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#if defined(ANDROID)
|
||||
// Disable sending console to logcat on release builds.
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"consoleservice.logcat",
|
||||
consoleservice_logcat,
|
||||
bool, NOT_IN_RELEASE_OR_BETA_VALUE
|
||||
)
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Prefs starting with "device."
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/StaticPrefs.h"
|
||||
#include "mozilla/SystemGroup.h"
|
||||
|
||||
#if defined(ANDROID)
|
||||
@ -57,9 +58,6 @@ static const bool gLoggingBuffered = true;
|
||||
#ifdef XP_WIN
|
||||
static bool gLoggingToDebugger = true;
|
||||
#endif // XP_WIN
|
||||
#if defined(ANDROID)
|
||||
static bool gLoggingLogcat = false;
|
||||
#endif // defined(ANDROID)
|
||||
|
||||
nsConsoleService::MessageElement::~MessageElement() {}
|
||||
|
||||
@ -138,16 +136,6 @@ class AddConsolePrefWatchers : public Runnable {
|
||||
: mozilla::Runnable("AddConsolePrefWatchers"), mConsole(aConsole) {}
|
||||
|
||||
NS_IMETHOD Run() override {
|
||||
#if defined(ANDROID)
|
||||
Preferences::AddBoolVarCache(&gLoggingLogcat, "consoleservice.logcat",
|
||||
# ifdef RELEASE_OR_BETA
|
||||
false
|
||||
# else
|
||||
true
|
||||
# endif
|
||||
);
|
||||
#endif // defined(ANDROID)
|
||||
|
||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||
MOZ_ASSERT(obs);
|
||||
obs->AddObserver(mConsole, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
|
||||
@ -248,7 +236,7 @@ nsresult nsConsoleService::LogMessageWithMode(
|
||||
MutexAutoLock lock(mLock);
|
||||
|
||||
#if defined(ANDROID)
|
||||
if (gLoggingLogcat && aOutputMode == OutputToLog) {
|
||||
if (StaticPrefs::consoleservice_logcat() && aOutputMode == OutputToLog) {
|
||||
nsCString msg;
|
||||
aMessage->ToString(msg);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user