log levels

This commit is contained in:
Ari Lazier 2016-01-13 11:50:19 -08:00
parent b45948eb9a
commit 1ded2e661b
2 changed files with 8 additions and 8 deletions

View File

@ -42,7 +42,7 @@ public class RealmReactAndroid extends ReactContextBaseJavaModule {
@Override @Override
public Map<String, Object> getConstants() { public Map<String, Object> getConstants() {
long contexts = injectRealmJsContext(filesDirPath); long contexts = injectRealmJsContext(filesDirPath);
Log.w("RealmReactAndroid", "Initialized " + contexts + " contexts"); Log.i("RealmReactAndroid", "Initialized " + contexts + " contexts");
if (contexts == 0) { if (contexts == 0) {
startWebServer(); startWebServer();
} }
@ -52,7 +52,7 @@ public class RealmReactAndroid extends ReactContextBaseJavaModule {
@Override @Override
public void onCatalystInstanceDestroy() { public void onCatalystInstanceDestroy() {
if (webServer != null) { if (webServer != null) {
Log.w("RealmReactAndroid", "Stopping the webserver"); Log.i("RealmReactAndroid", "Stopping the webserver");
webServer.stop(); webServer.stop();
} }
} }
@ -67,7 +67,7 @@ public class RealmReactAndroid extends ReactContextBaseJavaModule {
webServer = new AndroidWebServer(DEFAULT_PORT); webServer = new AndroidWebServer(DEFAULT_PORT);
try { try {
webServer.start(); 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) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
@ -86,7 +86,7 @@ public class RealmReactAndroid extends ReactContextBaseJavaModule {
@Override @Override
public Response serve(IHTTPSession session) { public Response serve(IHTTPSession session) {
String cmdUri = session.getUri(); 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 = "<html><body><h1>Hello server</h1>\n"; // String msg = "<html><body><h1>Hello server</h1>\n";
// Map<String, String> parms = session.getParms(); // Map<String, String> parms = session.getParms();
// if (parms.get("username") == null) { // if (parms.get("username") == null) {

View File

@ -21,7 +21,7 @@
JNIEXPORT jlong JNICALL Java_com_reacttests_RealmReactAndroid_injectRealmJsContext JNIEXPORT jlong JNICALL Java_com_reacttests_RealmReactAndroid_injectRealmJsContext
(JNIEnv *env, jclass, jstring fileDir) (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); void* handle = dlopen ("libreactnativejni.so", RTLD_LAZY);
if (!handle) { if (!handle) {
return 0; return 0;
@ -33,7 +33,7 @@ JNIEXPORT jlong JNICALL Java_com_reacttests_RealmReactAndroid_injectRealmJsConte
realm::set_default_realm_file_directory(strFileDir); realm::set_default_realm_file_directory(strFileDir);
env->ReleaseStringUTFChars(fileDir , 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 // load the symbol
typedef std::unordered_map<JSContextRef, facebook::react::JSCExecutor*> (*get_jsc_context_t)(); typedef std::unordered_map<JSContextRef, facebook::react::JSCExecutor*> (*get_jsc_context_t)();
@ -63,7 +63,7 @@ JNIEXPORT jlong JNICALL Java_com_reacttests_RealmReactAndroid_injectRealmJsConte
JNIEXPORT jlong JNICALL Java_com_reacttests_RealmReactAndroid_setupChromeDebugModeRealmJsContext JNIEXPORT jlong JNICALL Java_com_reacttests_RealmReactAndroid_setupChromeDebugModeRealmJsContext
(JNIEnv *, jclass) (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) { if (s_rpc_server) {
delete 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 JNIEXPORT jstring JNICALL Java_com_reacttests_RealmReactAndroid_processChromeDebugCommand
(JNIEnv *env, jclass, jlong rpc_server_ptr, jstring chrome_cmd, jstring chrome_args) (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* cmd = env->GetStringUTFChars(chrome_cmd, NULL);
const char* args = env->GetStringUTFChars(chrome_args, NULL); const char* args = env->GetStringUTFChars(chrome_args, NULL);
realm_js::json json = realm_js::json::parse(args); realm_js::json json = realm_js::json::parse(args);