Revert "change printf to LOGD in scldebug.cpp"
authorJi-hoon Lee <dalton.lee@samsung.com>
Mon, 13 May 2013 10:43:07 +0000 (19:43 +0900)
committerGerrit Code Review <gerrit2@kim11>
Mon, 13 May 2013 10:43:07 +0000 (19:43 +0900)
This reverts commit 6c1c2dca4beddd219859d1a29d85f780a6d23327

scl/include/scldebug.h
scl/scldebug.cpp
scl/sclresourcecache.cpp

index 102c063..78e9116 100644 (file)
 #include <stdlib.h>
 #include <stdio.h>
 
-#include <dlog.h>
-#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
 
index 1f0aed1..7eab4ab 100644 (file)
@@ -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;
index 2b8d3d9..8da21ad 100644 (file)
@@ -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;
 }