mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 702029 - Push all console logging to androids adb logcat. r=blassey
This commit is contained in:
parent
a94842c06f
commit
daffb2c587
@ -53,6 +53,10 @@
|
||||
#include "nsConsoleMessage.h"
|
||||
#include "nsIClassInfoImpl.h"
|
||||
|
||||
#if defined(ANDROID)
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
NS_IMPL_THREADSAFE_ADDREF(nsConsoleService)
|
||||
@ -135,6 +139,16 @@ nsConsoleService::LogMessage(nsIConsoleMessage *message)
|
||||
{
|
||||
MutexAutoLock lock(mLock);
|
||||
|
||||
#if defined(ANDROID)
|
||||
{
|
||||
nsXPIDLString msg;
|
||||
message->GetMessageMoz(getter_Copies(msg));
|
||||
__android_log_print(ANDROID_LOG_ERROR, "Gecko *** Console Service *** ",
|
||||
"%s",
|
||||
NS_LossyConvertUTF16toASCII(msg).get());
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If there's already a message in the slot we're about to replace,
|
||||
* we've wrapped around, and we need to release the old message. We
|
||||
|
Loading…
Reference in New Issue
Block a user