From 1ded2e661bb06460c38906f9744017cc025be742 Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Wed, 13 Jan 2016 11:50:19 -0800 Subject: [PATCH] log levels --- .../src/main/java/com/reacttests/RealmReactAndroid.java | 8 ++++---- src/android/com_reacttests_RealmReactAndroid.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/react-native/android/app/src/main/java/com/reacttests/RealmReactAndroid.java b/react-native/android/app/src/main/java/com/reacttests/RealmReactAndroid.java index ed5ab734..af5ae77d 100644 --- a/react-native/android/app/src/main/java/com/reacttests/RealmReactAndroid.java +++ b/react-native/android/app/src/main/java/com/reacttests/RealmReactAndroid.java @@ -42,7 +42,7 @@ public class RealmReactAndroid extends ReactContextBaseJavaModule { @Override public Map getConstants() { long contexts = injectRealmJsContext(filesDirPath); - Log.w("RealmReactAndroid", "Initialized " + contexts + " contexts"); + Log.i("RealmReactAndroid", "Initialized " + contexts + " contexts"); if (contexts == 0) { startWebServer(); } @@ -52,7 +52,7 @@ public class RealmReactAndroid extends ReactContextBaseJavaModule { @Override public void onCatalystInstanceDestroy() { if (webServer != null) { - Log.w("RealmReactAndroid", "Stopping the webserver"); + Log.i("RealmReactAndroid", "Stopping the webserver"); webServer.stop(); } } @@ -67,7 +67,7 @@ public class RealmReactAndroid extends ReactContextBaseJavaModule { webServer = new AndroidWebServer(DEFAULT_PORT); try { webServer.start(); - Log.w("RealmReactAndroid", "Starting WebServer, Host: " + webServer.getHostname() + " Port: " + webServer.getListeningPort()); + Log.i("RealmReactAndroid", "Starting WebServer, Host: " + webServer.getHostname() + " Port: " + webServer.getListeningPort()); } catch (IOException e) { e.printStackTrace(); } @@ -86,7 +86,7 @@ public class RealmReactAndroid extends ReactContextBaseJavaModule { @Override public Response serve(IHTTPSession session) { String cmdUri = session.getUri(); - Log.w("AndroidWebServer", "Session Uri: " + cmdUri + " Mehtod: " + session.getMethod().name()); + Log.v("AndroidWebServer", "Session Uri: " + cmdUri + " Mehtod: " + session.getMethod().name()); // String msg = "

Hello server

\n"; // Map parms = session.getParms(); // if (parms.get("username") == null) { diff --git a/src/android/com_reacttests_RealmReactAndroid.cpp b/src/android/com_reacttests_RealmReactAndroid.cpp index 657f76ae..aca05e9f 100644 --- a/src/android/com_reacttests_RealmReactAndroid.cpp +++ b/src/android/com_reacttests_RealmReactAndroid.cpp @@ -21,7 +21,7 @@ JNIEXPORT jlong JNICALL Java_com_reacttests_RealmReactAndroid_injectRealmJsContext (JNIEnv *env, jclass, jstring fileDir) { - __android_log_print(ANDROID_LOG_ERROR, "JSRealm", "Java_com_reacttests_RealmReactAndroid_injectRealmJsContext"); + __android_log_print(ANDROID_LOG_DEBUG, "JSRealm", "Java_com_reacttests_RealmReactAndroid_injectRealmJsContext"); void* handle = dlopen ("libreactnativejni.so", RTLD_LAZY); if (!handle) { return 0; @@ -33,7 +33,7 @@ JNIEXPORT jlong JNICALL Java_com_reacttests_RealmReactAndroid_injectRealmJsConte realm::set_default_realm_file_directory(strFileDir); env->ReleaseStringUTFChars(fileDir , strFileDir); - __android_log_print(ANDROID_LOG_ERROR, "JSRealm", "Absolute path %s", realm::default_realm_file_directory().c_str()); + __android_log_print(ANDROID_LOG_DEBUG, "JSRealm", "Absolute path %s", realm::default_realm_file_directory().c_str()); // load the symbol typedef std::unordered_map (*get_jsc_context_t)(); @@ -63,7 +63,7 @@ JNIEXPORT jlong JNICALL Java_com_reacttests_RealmReactAndroid_injectRealmJsConte JNIEXPORT jlong JNICALL Java_com_reacttests_RealmReactAndroid_setupChromeDebugModeRealmJsContext (JNIEnv *, jclass) { - __android_log_print(ANDROID_LOG_ERROR, "JSRealm", "Java_com_reacttests_RealmReactAndroid_setupChromeDebugModeRealmJsContext"); + __android_log_print(ANDROID_LOG_VERBOSE, "JSRealm", "Java_com_reacttests_RealmReactAndroid_setupChromeDebugModeRealmJsContext"); if (s_rpc_server) { delete s_rpc_server; } @@ -79,7 +79,7 @@ JNIEXPORT jlong JNICALL Java_com_reacttests_RealmReactAndroid_injectRealmJsConte JNIEXPORT jstring JNICALL Java_com_reacttests_RealmReactAndroid_processChromeDebugCommand (JNIEnv *env, jclass, jlong rpc_server_ptr, jstring chrome_cmd, jstring chrome_args) { - __android_log_print(ANDROID_LOG_ERROR, "JSRealm", "Java_com_reacttests_RealmReactAndroid_processChromeDebugCommand"); + __android_log_print(ANDROID_LOG_VERBOSE, "JSRealm", "Java_com_reacttests_RealmReactAndroid_processChromeDebugCommand"); const char* cmd = env->GetStringUTFChars(chrome_cmd, NULL); const char* args = env->GetStringUTFChars(chrome_args, NULL); realm_js::json json = realm_js::json::parse(args);