Skip to content

Commit

Permalink
feat: enable native log
Browse files Browse the repository at this point in the history
Signed-off-by: qwq233 <qwq233@qwq2333.top>
  • Loading branch information
qwq233 committed Jul 10, 2024
1 parent e16f644 commit 170b7d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion TMessagesProj/jni/tgnet/FileLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifdef DEBUG_VERSION
bool LOGS_ENABLED = true;
#else
bool LOGS_ENABLED = false;
bool LOGS_ENABLED = true;
#endif

#include "../integrity/include/rust.h"
Expand Down
10 changes: 5 additions & 5 deletions TMessagesProj/src/main/java/top/qwq2333/nullgram/utils/Log.kt
Original file line number Diff line number Diff line change
Expand Up @@ -257,16 +257,16 @@ object Log {
AnalyticsUtils.trackCrashes(throwable)
}

private const val ENABLE_NATIVE_LOG = false
private const val ENABLE_NATIVE_LOG = true

@JvmStatic
fun nativeLog(level: Int, tag: String, msg: String) {
if (!ENABLE_NATIVE_LOG) return
when(level) {
0 -> d(tag, msg)
1 -> i(tag, msg)
2 -> w(tag, msg)
3 -> e(tag, msg)
0 -> Log.d("tgnet", msg)
1 -> Log.i("tgnet", msg)
2 -> Log.w("tgnet", msg)
3 -> Log.e("tgnet", msg)
}
}
}

0 comments on commit 170b7d2

Please sign in to comment.