summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-02-28 10:22:25 +0200
committerTor Lillqvist <tml@iki.fi>2013-02-28 22:34:22 +0200
commit0de21643a9ab3e9e906195752b5f0c76a1cd0bc9 (patch)
treec6fad861af82713b40511488804d9c00a1dbfcd7
parentc9f637c882a90940bc99ec55b9713230ab26a675 (diff)
Use proper Android logging here, too
Change-Id: Idfa826b9dd3156f2471ffd7dac245e68de8f4169
-rw-r--r--desktop/source/app/sofficemain.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx
index cc4064818fd5..7ae12fb8ae71 100644
--- a/desktop/source/app/sofficemain.cxx
+++ b/desktop/source/app/sofficemain.cxx
@@ -32,7 +32,11 @@
#ifdef ANDROID
# include <jni.h>
+# include <android/log.h>
# include <salhelper/thread.hxx>
+
+# define LOGTAG "LibreOffice/sofficemain"
+# define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, LOGTAG, __VA_ARGS__))
#endif
int SVMain();
@@ -79,8 +83,8 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main()
return SVMain();
#if defined ANDROID
} catch (const ::com::sun::star::uno::Exception &e) {
- fprintf (stderr, "Not handled UNO exception at main: '%s'\n",
- rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
+ LOGI("Unhandled UNO exception: '%s'",
+ rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
throw; // to get exception type printed
}
#endif
@@ -96,7 +100,7 @@ public:
int nRet;
do {
nRet = soffice_main();
- fprintf( stderr, "nRet %d\n", nRet );
+ LOGI("soffice_main returned %d", nRet );
} while (nRet == 81 || nRet == 79); // pretend to re-start.
exit (nRet);
}
@@ -106,7 +110,6 @@ extern "C" SAL_JNI_EXPORT void JNICALL
Java_org_libreoffice_experimental_desktop_Desktop_spawnMain(JNIEnv* /* env */,
jobject /* dummy */)
{
- fprintf(stderr, "Spawn main!\n");
new MainThread();
}
#endif