diff --git a/java/jni/ZT1_jnicache.cpp b/java/jni/ZT1_jnicache.cpp index daa1679ac..8d6305cb2 100644 --- a/java/jni/ZT1_jnicache.cpp +++ b/java/jni/ZT1_jnicache.cpp @@ -36,7 +36,7 @@ JniCache::JniCache() , m_methods() , m_staticMethods() { - LOGD("JNI Cache Created"); + LOGV("JNI Cache Created"); } JniCache::JniCache(JavaVM *jvm) @@ -47,12 +47,12 @@ JniCache::JniCache(JavaVM *jvm) , m_methods() , m_staticMethods() { - LOGD("JNI Cache Created"); + LOGV("JNI Cache Created"); } JniCache::~JniCache() { - LOGD("JNI Cache Destroyed"); + LOGV("JNI Cache Destroyed"); clearCache(); } @@ -80,7 +80,7 @@ void JniCache::clearCache() void JniCache::setJavaVM(JavaVM *jvm) { - LOGD("Assigned JVM to object"); + LOGV("Assigned JVM to object"); m_jvm = jvm; } @@ -116,7 +116,7 @@ jclass JniCache::findClass(const std::string &name) return cls; } - LOGD("Returning cached %s", name.c_str()); + LOGV("Returning cached %s", name.c_str()); return found->second; } diff --git a/java/jni/ZT1_jniutils.h b/java/jni/ZT1_jniutils.h index d8baf85de..909717863 100644 --- a/java/jni/ZT1_jniutils.h +++ b/java/jni/ZT1_jniutils.h @@ -12,10 +12,12 @@ extern "C" { #if __ANDROID__ #include +#define LOGV(...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__)) #define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)) #define LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)) #define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)) #else +#define LOGV(...) fprintf(stdout, __VA_ARGS__) #define LOGI(...) fprintf(stdout, __VA_ARGS__) #define LOGD(...) fprintf(stdout, __VA_ARGS__) #define LOGE(...) fprintf(stdout, __VA_ARGS__) diff --git a/java/jni/com_zerotierone_sdk_Node.cpp b/java/jni/com_zerotierone_sdk_Node.cpp index bcf940f5c..50b979ce5 100644 --- a/java/jni/com_zerotierone_sdk_Node.cpp +++ b/java/jni/com_zerotierone_sdk_Node.cpp @@ -324,7 +324,7 @@ namespace { return -2; // couldn't create long[1] array } - LOGD("Calling onDataStoreGet(%s, %p, %lu, %p)", + LOGV("Calling onDataStoreGet(%s, %p, %lu, %p)", objectName, buffer, bufferIndex, objectSizeObj); long retval = (long)env->CallLongMethod( @@ -470,7 +470,7 @@ JNIEXPORT void JNICALL JNI_OnUnload(JavaVM *vm, void *reserved) JNIEXPORT jobject JNICALL Java_com_zerotier_sdk_Node_node_1init( JNIEnv *env, jobject obj, jlong now) { - LOGD("Creating ZT1_Node struct"); + LOGV("Creating ZT1_Node struct"); jobject resultObject = createResultObject(env, ZT1_RESULT_OK); ZT1_Node *node; @@ -604,7 +604,7 @@ JNIEXPORT jobject JNICALL Java_com_zerotier_sdk_Node_node_1init( JNIEXPORT void JNICALL Java_com_zerotier_sdk_Node_node_1delete( JNIEnv *env, jobject obj, jlong id) { - LOGD("Destroying ZT1_Node struct"); + LOGV("Destroying ZT1_Node struct"); uint64_t nodeId = (uint64_t)id; NodeMap::iterator found = nodeMap.find(nodeId);