From b34b2f0ce7f6e81ca05a16a19f40988c8c5adf49 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Mon, 13 May 2013 19:43:07 +0900 Subject: [PATCH] Revert "change printf to LOGD in scldebug.cpp" This reverts commit 6c1c2dca4beddd219859d1a29d85f780a6d23327 --- scl/include/scldebug.h | 14 +++++--------- scl/scldebug.cpp | 8 ++++---- scl/sclresourcecache.cpp | 2 +- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/scl/include/scldebug.h b/scl/include/scldebug.h index 102c063..78e9116 100644 --- a/scl/include/scldebug.h +++ b/scl/include/scldebug.h @@ -21,10 +21,6 @@ #include #include -#include -#ifndef LOG_TAG -#define LOG_TAG "LIBSCL_UI" -#endif #ifdef __cplusplus extern "C" { @@ -56,14 +52,14 @@ extern "C" /* assert macro */ #define scl_assert(_e) \ - if (!(_e)) LOGD(mc_red "scl assert!(%s) failed at file :%s, line %04d, func: %s" mc_normal "\n", #_e, __FILE__, __LINE__, __FUNCTION__); + if (!(_e)) printf(mc_red "scl assert!(%s) failed at file :%s, line %04d, func: %s" mc_normal "\n", #_e, __FILE__, __LINE__, __FUNCTION__); #define scl_assert_return(_e) \ - if (!(_e)) { LOGD(mc_red "scl assert!(%s) failed at file :%s, line %04d, func: %s" mc_normal "\n", #_e, __FILE__, __LINE__, __FUNCTION__); \ + if (!(_e)) { printf(mc_red "scl assert!(%s) failed at file :%s, line %04d, func: %s" mc_normal "\n", #_e, __FILE__, __LINE__, __FUNCTION__); \ return;} #define scl_assert_return_false(_e) \ - if (!(_e)) {LOGD(mc_red "scl assert!(%s) failed at file :%s, line %04d, func: %s" mc_normal "\n", #_e, __FILE__, __LINE__, __FUNCTION__); \ + if (!(_e)) {printf(mc_red "scl assert!(%s) failed at file :%s, line %04d, func: %s" mc_normal "\n", #_e, __FILE__, __LINE__, __FUNCTION__); \ return 0;} #define scl_assert_return_null scl_assert_return_false @@ -87,13 +83,13 @@ extern "C" static struct timeval t0;\ static struct timeval t1;\ gettimeofday(&t0, NULL);\ - LOGD("[%-20.20s][%04d][" mc_blue "%s" mc_normal "]\n", __FILE__, __LINE__, __FUNCTION__); + printf("[%-20.20s][%04d][" mc_blue "%s" mc_normal "]\n", __FILE__, __LINE__, __FUNCTION__); #define SCL_DEBUG_END() \ gettimeofday(&t1, NULL);\ float etime;\ etime = ((t1.tv_sec * 1000000 + t1.tv_usec) - (t0.tv_sec * 1000000 + t0.tv_usec))/1000000.0;\ - LOGD("[%-20.20s][%04d][%s] E: " mc_green "%f" mc_normal " (S:%u) \n", __FILE__, __LINE__, __FUNCTION__, etime, (t0.tv_sec * 1000000 + t0.tv_usec) ); + printf("[%-20.20s][%04d][%s] E: " mc_green "%f" mc_normal " (S:%u) \n", __FILE__, __LINE__, __FUNCTION__, etime, (t0.tv_sec * 1000000 + t0.tv_usec) ); #define IO_TEST diff --git a/scl/scldebug.cpp b/scl/scldebug.cpp index 1f0aed1..7eab4ab 100644 --- a/scl/scldebug.cpp +++ b/scl/scldebug.cpp @@ -44,9 +44,9 @@ float SCL_DEBUG_TIME(const char* fileStr, int line, const char* str) etime = ((t1.tv_sec * 1000000 + t1.tv_usec) - (t0.tv_sec * 1000000 + t0.tv_usec))/1000000.0; } if (strncmp(str, "get_", 4) == 0) { - //LOGD("[%-20.20s]%04d [T:%u][E:" mc_red "%f" mc_normal "]" mc_normal " %s" mc_normal "\n", pFileStr, line, (t1.tv_sec * 1000000 + t1.tv_usec), etime, str); + //printf("[%-20.20s]%04d [T:%u][E:" mc_red "%f" mc_normal "]" mc_normal " %s" mc_normal "\n", pFileStr, line, (t1.tv_sec * 1000000 + t1.tv_usec), etime, str); } else { - LOGD("[%-20.20s]%04d [T:%u][E:" mc_red "%f" mc_normal "]" mc_blue " %s" mc_normal "\n", pFileStr, line, (t1.tv_sec * 1000000 + t1.tv_usec), etime, str); + printf("[%-20.20s]%04d [T:%u][E:" mc_red "%f" mc_normal "]" mc_blue " %s" mc_normal "\n", pFileStr, line, (t1.tv_sec * 1000000 + t1.tv_usec), etime, str); } t0 = t1; } @@ -57,7 +57,7 @@ static float _SCL_DEBUG_ELAPASED_TIME(const char* str, struct timeval t0, struct { float etime; etime = ((t1.tv_sec * 1000000 + t1.tv_usec) - (t0.tv_sec * 1000000 + t0.tv_usec))/1000000.0; - LOGD("[%s] elap-time = " mc_green "%f" mc_normal " (%u~%u) \n", str, etime, (t0.tv_sec * 1000000 + t0.tv_usec), (t1.tv_sec * 1000000 + t1.tv_usec)); + printf("[%s] elap-time = " mc_green "%f" mc_normal " (%u~%u) \n", str, etime, (t0.tv_sec * 1000000 + t0.tv_usec), (t1.tv_sec * 1000000 + t1.tv_usec)); return etime; } @@ -71,7 +71,7 @@ float SCL_DEBUG_ELAPASED_TIME(const char* fileStr, int line, const char* str, in if (type == MEASURE_START) { gettimeofday(&s_tv1, NULL); s_start_line = line; - LOGD("[%-20.20s]%04d [T:%u]" mc_blue " %s" mc_normal "\n", fileStr, line, (s_tv1.tv_sec * 1000000 + s_tv1.tv_usec), str); + printf("[%-20.20s]%04d [T:%u]" mc_blue " %s" mc_normal "\n", fileStr, line, (s_tv1.tv_sec * 1000000 + s_tv1.tv_usec), str); } else if (type == MEASURE_END) { gettimeofday(&s_tv2, NULL); s_end_line = line; diff --git a/scl/sclresourcecache.cpp b/scl/sclresourcecache.cpp index 2b8d3d9..8da21ad 100644 --- a/scl/sclresourcecache.cpp +++ b/scl/sclresourcecache.cpp @@ -757,7 +757,7 @@ CSCLResourceCache::add_private_key(SclPrivateKeyProperties* privProperties, sclb #endif if (ret == NOT_USED) { - LOGD("Failed!. Out of private data buffer\n"); + printf("Failed!. Out of private data buffer\n"); } return ret; } -- 2.7.4