Compare commits

...

1 Commits

Author SHA1 Message Date
ee37b0a02b Logger 2025-10-16 13:13:42 +05:30

View File

@ -32,7 +32,7 @@ namespace ia
StringStream ss; StringStream ss;
UNUSED((ss << ... << args)); UNUSED((ss << ... << args));
#ifdef __ANDROID__ #ifdef __ANDROID__
__android_log_print(ANDROID_LOG_DEBUG, "IAApp", ss.str().c_str()); __android_log_print(ANDROID_LOG_DEBUG, "IAApp", "%s", ss.str().c_str());
#else #else
printf("\033[0;37m[INFO]: [%s] %s\033[39m\n", tag, ss.str().c_str()); printf("\033[0;37m[INFO]: [%s] %s\033[39m\n", tag, ss.str().c_str());
#endif #endif
@ -43,7 +43,7 @@ namespace ia
StringStream ss; StringStream ss;
UNUSED((ss << ... << args)); UNUSED((ss << ... << args));
#ifdef __ANDROID__ #ifdef __ANDROID__
__android_log_print(ANDROID_LOG_INFO, "IAApp", ss.str().c_str()); __android_log_print(ANDROID_LOG_INFO, "IAApp", "%s", ss.str().c_str());
#else #else
printf("\033[32m[SUCCESS]: [%s] %s\033[39m\n", tag, ss.str().c_str()); printf("\033[32m[SUCCESS]: [%s] %s\033[39m\n", tag, ss.str().c_str());
#endif #endif
@ -54,7 +54,7 @@ namespace ia
StringStream ss; StringStream ss;
UNUSED((ss << ... << args)); UNUSED((ss << ... << args));
#ifdef __ANDROID__ #ifdef __ANDROID__
__android_log_print(ANDROID_LOG_DEBUG, "IAApp", ss.str().c_str()); __android_log_print(ANDROID_LOG_DEBUG, "IAApp", "%s", ss.str().c_str());
#else #else
printf("\033[33m[WARN]: [%s] %s\033[39m\n", tag, ss.str().c_str()); printf("\033[33m[WARN]: [%s] %s\033[39m\n", tag, ss.str().c_str());
#endif #endif
@ -65,7 +65,7 @@ namespace ia
StringStream ss; StringStream ss;
UNUSED((ss << ... << args)); UNUSED((ss << ... << args));
#ifdef __ANDROID__ #ifdef __ANDROID__
__android_log_print(ANDROID_LOG_ERROR, "IAApp", ss.str().c_str()); __android_log_print(ANDROID_LOG_ERROR, "IAApp", "%s", ss.str().c_str());
#else #else
printf("\033[31m[ERROR]: [%s] %s\033[39m\n", tag, ss.str().c_str()); printf("\033[31m[ERROR]: [%s] %s\033[39m\n", tag, ss.str().c_str());
#endif #endif