[UTC][STC][Non-ACR][Modified log print]
authorhyunuktak <hyunuk.tak@samsung.com>
Thu, 17 Aug 2017 04:21:55 +0000 (13:21 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Thu, 17 Aug 2017 04:21:58 +0000 (13:21 +0900)
Change-Id: I93edd59a95ab0e868902db45cfcb13236c618c6e
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
src/utc/stc/utc-stc-common.c
src/utc/stc/utc-stc-common.h

index f7d4087b98abd38fd33d6929c9a4be3e4cd8b2fa..d28be00e49e3fd94944b216759b40208864fe142 100755 (executable)
@@ -63,14 +63,14 @@ bool stc_check_feature_supported(char *key)
        int ret = system_info_get_platform_bool(key, &value);
 
        if (ret != SYSTEM_INFO_ERROR_NONE) {
-               STCLOG("[%s:%d] system_info_get_platform_bool failed, error returned = %d\\n", __FILE__, __LINE__, ret);
+               FPRINTF("[%s:%d] system_info_get_platform_bool failed, error returned = %d\\n", __FILE__, __LINE__, ret);
                return false;
        }
 
        if (value) {
-               STCLOG("[%s:%d] %s feature is supported\\n", __FILE__, __LINE__, key);
+               FPRINTF("[%s:%d] %s feature is supported\\n", __FILE__, __LINE__, key);
        } else {
-               STCLOG("[%s:%d] %s feature is not supported\\n", __FILE__, __LINE__, key);
+               FPRINTF("[%s:%d] %s feature is not supported\\n", __FILE__, __LINE__, key);
        }
 
        return value;
index ed595da602edfa18961319eaf7c342cb224816db..60dbd39a9d89c6c0eb4e98b67a548dd5f1eb5b5f 100755 (executable)
@@ -46,20 +46,12 @@ GMainLoop *g_pMainLoop;
 guint g_nTimeoutId;
 int g_nCallbackRet;
 
-FILE *g_fpLog;
-
 bool g_bFeatureSTC;
 
 stc_h g_hSTC;
 stc_stats_rule_h g_hRule;
 stc_error_e g_nCallbackRet;
 
-#define STCLOG(...) {\
-       g_fpLog = fopen(ERR_UTC_LOG, "a");\
-       fprintf(g_fpLog, __VA_ARGS__);\
-       fclose(g_fpLog);\
-}
-
 #define RUN_GMAIN_LOOP {\
        g_pMainLoop = g_main_loop_new(NULL, false);\
        g_nTimeoutId = g_timeout_add(GMAINTIMEOUT, stc_callback_timeut, g_pMainLoop);\
@@ -75,14 +67,14 @@ stc_error_e g_nCallbackRet;
 
 #define PRINT_RETURN(api, ret) {\
        if (STC_DEBUG) {\
-               STCLOG("[%s:%d] %s returned = %s\\n",\
+               FPRINTF("[%s:%d] %s returned = %s\\n",\
                        __FILE__, __LINE__, api, stc_get_error(ret));\
        }\
 }
 
 #define CHECK_RETURN(api, ret, val) {\
        if (ret != val) {\
-               STCLOG("[%s:%d] %s failed, error returned = %s\\n",\
+               FPRINTF("[%s:%d] %s failed, error returned = %s\\n",\
                        __FILE__, __LINE__, api, stc_get_error(ret));\
                return 1;\
        } else {\