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;
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);\
#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 {\