8000 Prevent logging when LOG_NDEBUG is specified · oneNF/android-database-sqlcipher@0c4fc46 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0c4fc46

Browse files
Prevent logging when LOG_NDEBUG is specified
1 parent 3f36025 commit 0c4fc46

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

jni/log.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
#include <android/log.h>
22

3+
#ifdef LOG_NDEBUG
4+
#define LOGI(...)
5+
#define LOGE(...)
6+
#define LOGV(...)
7+
#define LOGD(...)
8+
#else
39
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
410
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
511
#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE,LOG_TAG,__VA_ARGS__)
612
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
13+
#endif
714

815
#ifndef LOG
916
#define LOG(priority, tag, ...) \

0 commit comments

Comments
 (0)
0