summaryrefslogtreecommitdiffstats
path: root/xpcom/base/nsConsoleService.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xpcom/base/nsConsoleService.cpp')
-rw-r--r--xpcom/base/nsConsoleService.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/xpcom/base/nsConsoleService.cpp b/xpcom/base/nsConsoleService.cpp
index 3862a02c4..fccb8370f 100644
--- a/xpcom/base/nsConsoleService.cpp
+++ b/xpcom/base/nsConsoleService.cpp
@@ -26,10 +26,6 @@
#include "mozilla/Preferences.h"
-#if defined(ANDROID)
-#include <android/log.h>
-#include "mozilla/dom/ContentChild.h"
-#endif
#ifdef XP_WIN
#include <windows.h>
#endif
@@ -51,9 +47,6 @@ NS_IMPL_CI_INTERFACE_GETTER(nsConsoleService, nsIConsoleService, nsIObserver)
static bool sLoggingEnabled = true;
static bool sLoggingBuffered = true;
-#if defined(ANDROID)
-static bool sLoggingLogcat = true;
-#endif // defined(ANDROID)
nsConsoleService::MessageElement::~MessageElement()
{
@@ -132,9 +125,6 @@ public:
{
Preferences::AddBoolVarCache(&sLoggingEnabled, "consoleservice.enabled", true);
Preferences::AddBoolVarCache(&sLoggingBuffered, "consoleservice.buffered", true);
-#if defined(ANDROID)
- Preferences::AddBoolVarCache(&sLoggingLogcat, "consoleservice.logcat", true);
-#endif // defined(ANDROID)
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
MOZ_ASSERT(obs);
@@ -238,43 +228,6 @@ nsConsoleService::LogMessageWithMode(nsIConsoleMessage* aMessage,
{
MutexAutoLock lock(mLock);
-#if defined(ANDROID)
- if (sLoggingLogcat && aOutputMode == OutputToLog) {
- nsCString msg;
- aMessage->ToString(msg);
-
- /** Attempt to use the process name as the log tag. */
- mozilla::dom::ContentChild* child =
- mozilla::dom::ContentChild::GetSingleton();
- nsCString appName;
- if (child) {
- child->GetProcessName(appName);
- } else {
- appName = "GeckoConsole";
- }
-
- uint32_t logLevel = 0;
- aMessage->GetLogLevel(&logLevel);
-
- android_LogPriority logPriority = ANDROID_LOG_INFO;
- switch (logLevel) {
- case nsIConsoleMessage::debug:
- logPriority = ANDROID_LOG_DEBUG;
- break;
- case nsIConsoleMessage::info:
- logPriority = ANDROID_LOG_INFO;
- break;
- case nsIConsoleMessage::warn:
- logPriority = ANDROID_LOG_WARN;
- break;
- case nsIConsoleMessage::error:
- logPriority = ANDROID_LOG_ERROR;
- break;
- }
-
- __android_log_print(logPriority, appName.get(), "%s", msg.get());
- }
-#endif
#ifdef XP_WIN
if (IsDebuggerPresent()) {
nsString msg;