printf removed
authorKim Gibyoung <lastkgb.kim@samsung.com>
Tue, 7 May 2013 13:47:03 +0000 (22:47 +0900)
committerKim Gibyoung <lastkgb.kim@samsung.com>
Tue, 7 May 2013 13:53:43 +0000 (22:53 +0900)
Change-Id: I29037623a091c636bbe55fd1f1b807dc4561c26a

popup-wifidirect/include/wfd-app-util.h
popup-wifidirect/src/wfd-app-client.c
popup-wifidirect/src/wfd-app-util.c
ug-wifidirect/include/wfd_ug.h
ugapp-wifidirect/include/wfd-ugapp-util.h
ugapp-wifidirect/src/wfd-ugapp-util.c

index 1936ab3..b4ba8f4 100755 (executable)
 
 #else /** _DLOG_UTIL */
 
-#define WDPOP_LOGV(format, args...) \
-       printf("[V/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-#define WDPOP_LOGD(format, args...) \
-       printf("[D/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-#define WDPOP_LOGI(format, args...) \
-       printf("[I/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-#define WDPOP_LOGW(format, args...) \
-       printf("[W/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-#define WDPOP_LOGE(format, args...) \
-       printf("[E/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-#define WDPOP_LOGF(format, args...) \
-       printf("[F/WIFI_DIRECT_POPUP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-
-#define __WDPOP_LOG_FUNC_ENTER__ \
-       printf("[V/WIFI_DIRECT_POPUP] %s: %s()(%4d)> Enter", __FILE__, __FUNCTION__, __LINE__)
-#define __WDPOP_LOG_FUNC_EXIT__ \
-       printf("[V/WIFI_DIRECT_POPUP] %s: %s()(%4d)> Exit", __FILE__, __FUNCTION__, __LINE__)
+#define WDPOP_LOGV(format, args...)
+#define WDPOP_LOGD(format, args...)
+#define WDPOP_LOGI(format, args...)
+#define WDPOP_LOGW(format, args...)
+#define WDPOP_LOGE(format, args...)
+#define WDPOP_LOGF(format, args...)
+
+#define __WDPOP_LOG_FUNC_ENTER__
+#define __WDPOP_LOG_FUNC_EXIT__
 
 #endif /** _DLOG_UTIL */
 
index cc088f2..cc42794 100755 (executable)
@@ -606,7 +606,7 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
 
                if (auto_connection_mode == TRUE) {
                        result = wifi_direct_accept_connection(ad->peer_mac);
-                       printf("wifi_direct_accept_connection() result=[%d]\n", result);
+                       WDPOP_LOGD("wifi_direct_accept_connection() result=[%d]\n", result);
                } else {
                        if (wps_mode == WIFI_DIRECT_WPS_TYPE_PBC) {
                                WDPOP_LOGD( "wps_config is WIFI_DIRECT_WPS_TYPE_PBC\n");
@@ -666,7 +666,7 @@ void _cb_connection(int error_code, wifi_direct_connection_state_e connection_st
                wifi_direct_is_autoconnection_mode(&auto_connection_mode);
                if (auto_connection_mode == TRUE) {
                        result = wifi_direct_connect(ad->peer_mac);
-                       printf("wifi_direct_accept_connection() result=[%d]\n", result);
+                       WDPOP_LOGD("wifi_direct_accept_connection() result=[%d]\n", result);
                } else {
                        wfd_prepare_popup(WFD_POP_APRV_CONNECTION_INVITATION_REQ, NULL);
                }
index 4e77cc2..7231757 100644 (file)
@@ -67,7 +67,7 @@ int wfd_app_gettid()
 #ifdef __NR_gettid
        return syscall(__NR_gettid);
 #else
-       fprintf(stderr, "__NR_gettid is not defined, please include linux/unistd.h ");
+       WDPOP_LOGE("__NR_gettid is not defined, please include linux/unistd.h ");
        return -1;
 #endif
 }
index 1697175..fd78c31 100644 (file)
 
 #else /** _DLOG_UTIL */
 
-#define WDUG_LOGV(format, args...) \
-       printf("[V/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-#define WDUG_LOGD(format, args...) \
-       printf("[D/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-#define WDUG_LOGI(format, args...) \
-       printf("[I/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-#define WDUG_LOGW(format, args...) \
-       printf("[W/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-#define WDUG_LOGE(format, args...) \
-       printf("[E/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-#define WDUG_LOGF(format, args...) \
-       printf("[F/UG_WIFI_DIRECT] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-
-#define __WDUG_LOG_FUNC_ENTER__ \
-       printf("[V/UG_WIFI_DIRECT] %s: %s()(%4d)> Enter", __FILE__, __FUNCTION__, __LINE__)
-#define __WDUG_LOG_FUNC_EXIT__ \
-       printf("[V/UG_WIFI_DIRECT] %s: %s()(%4d)> Exit", __FILE__, __FUNCTION__, __LINE__)
+#define WDUG_LOGV(format, args...)
+#define WDUG_LOGD(format, args...)
+#define WDUG_LOGI(format, args...)
+#define WDUG_LOGW(format, args...)
+#define WDUG_LOGE(format, args...)
+#define WDUG_LOGF(format, args...)
+
+#define __WDUG_LOG_FUNC_ENTER__
+#define __WDUG_LOG_FUNC_EXIT__
 
 #endif /** _DLOG_UTIL */
 
index 7480a04..434f3a5 100755 (executable)
 } while (0)
 
 #else /** _DLOG_UTIL */
-#define WDUA_LOGV(format, args...) \
-       printf("[V/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-#define WDUA_LOGD(format, args...) \
-       printf("[D/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-#define WDUA_LOGI(format, args...) \
-       printf("[I/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-#define WDUA_LOGW(format, args...) \
-       printf("[W/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-#define WDUA_LOGE(format, args...) \
-       printf("[E/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
-#define WDUA_LOGF(format, args...) \
-       printf("[F/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> "format, __FILE__, __FUNCTION__, __LINE__, ##args)
+#define WDUA_LOGV(format, args...)
+#define WDUA_LOGD(format, args...)
+#define WDUA_LOGI(format, args...)
+#define WDUA_LOGW(format, args...)
+#define WDUA_LOGE(format, args...)
+#define WDUA_LOGF(format, args...)
 
-#define __WDUA_LOG_FUNC_ENTER__\
-       printf("[V/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> Enter", __FILE__, __FUNCTION__, __LINE__)
-#define __WDUA_LOG_FUNC_EXIT__ \
-       printf("[V/WIFI_DIRECT_UGAPP] %s: %s()(%4d)> Exit", __FILE__, __FUNCTION__, __LINE__)
+#define __WDUA_LOG_FUNC_ENTER__
+#define __WDUA_LOG_FUNC_EXIT__
 
 #endif /** _DLOG_UTIL */
 
index 2009c3c..73c42aa 100644 (file)
@@ -67,7 +67,7 @@ int wfd_app_gettid()
 #ifdef __NR_gettid
        return syscall(__NR_gettid);
 #else
-       fprintf(stderr, "__NR_gettid is not defined, please include linux/unistd.h ");
+       WDUA_LOGE("__NR_gettid is not defined, please include linux/unistd.h ");
        return -1;
 #endif
 }