diff --git a/build.gradle b/build.gradle index 214881c..228ad15 100644 --- a/build.gradle +++ b/build.gradle @@ -23,7 +23,7 @@ def linkerModuleName = 'fake-linker' def hookInstallModuleName = 'hook-install' def mVersionCode = 1100 def mVersionName = "1.1" -def buildApi = rootProject.props['buildApi'] ?: rootProject.targetSdk +def buildApi = rootProject.props['buildApi'] ?: 30 android { compileSdkVersion 30 @@ -46,7 +46,7 @@ android { arguments "-DANDROID_PLATFORM=${buildApi}", "-DLINKER_MODULE_NAME=${linkerModuleName}", "-DMERGE_BUILD=" + (rootProject.props['mergeBuild']?:true), "-DHOOK_INSTALL_MODULE_NAME=${hookInstallModuleName}", - "-DHOOK_LOG_LEVEL="+ (rootProject.props['logLevel']?:2), + "-DHOOK_LOG_LEVEL="+ (rootProject.props['logLevel']), "-DMODULE_VERSION=${mVersionCode}", "-DMODULE_VERSION_NAME=\"${mVersionName}\"" } diff --git a/src/main/cpp/common/alog.h b/src/main/cpp/common/alog.h index fb76462..6953efa 100644 --- a/src/main/cpp/common/alog.h +++ b/src/main/cpp/common/alog.h @@ -9,7 +9,7 @@ extern int g_log_level; #define LOG_TAG "HookLog" #define _PRINT(v, format, ...) \ do { \ - if(g_log_level < (v)) __android_log_print(v, LOG_TAG, format, ##__VA_ARGS__); \ + if(g_log_level <= (v)) __android_log_print(v, LOG_TAG, format, ##__VA_ARGS__); \ }while(0) #define LOGV(format, ...) _PRINT(ANDROID_LOG_VERBOSE, format, ##__VA_ARGS__) diff --git a/src/main/cpp/common/module_config.h b/src/main/cpp/common/module_config.h index 4b9233a..a777598 100644 --- a/src/main/cpp/common/module_config.h +++ b/src/main/cpp/common/module_config.h @@ -1,4 +1,4 @@ -#define HOOK_LOG_LEVEL 2 +#define HOOK_LOG_LEVEL 1 #define MODULE_VERSION 1100 #define MODULE_VERSION_NAME "1.1"