Index: /asp3_tinet_ecnl_rx/trunk/app1_usb_watt_meter/src/client.c
===================================================================
--- /asp3_tinet_ecnl_rx/trunk/app1_usb_watt_meter/src/client.c	(revision 349)
+++ /asp3_tinet_ecnl_rx/trunk/app1_usb_watt_meter/src/client.c	(revision 350)
@@ -47,8 +47,10 @@
 #include "kernel_cfg.h"
 #include "ff.h"
+#include "util/ntstdio.h"
 
 #define SKIP_PEER_VERIFICATION
 //#define SKIP_HOSTNAME_VERIFICATION
 char response[80];
+extern ntstdio_t ntstdio;
 
 void client_init(void)
@@ -74,5 +76,5 @@
 		response[len] = '\0';
 
-		syslog(LOG_NOTICE, response);
+		ntstdio_printf(&ntstdio, response);
 
 		dly_tsk(100 * 1000);
@@ -108,5 +110,5 @@
 		response[len] = '\0';
 
-		syslog(LOG_NOTICE, response);
+		ntstdio_printf(&ntstdio, response);
 
 		dly_tsk(100);
@@ -183,5 +185,5 @@
 	ret = f_open(&file, fname, FA_CREATE_ALWAYS | FA_WRITE);
 	if (ret != FR_OK) {
-		syslog(LOG_ERROR, "not open a upload file %d", ret);
+		ntstdio_printf(&ntstdio, "not open a upload file %d\n", ret);
 		return ret;
 	}
@@ -251,5 +253,5 @@
 	ret = write_log(fname);
 	if (ret != FR_OK) {
-		syslog(LOG_ERROR, "log file write error %d", ret);
+		ntstdio_printf(&ntstdio, "log file write error %d\n", ret);
 		return;
 	}
@@ -257,13 +259,13 @@
 	ret = f_open(&file, fname, FA_READ);
 	if (ret != FR_OK) {
-		syslog(LOG_ERROR, "log file open error %d", ret);
+		ntstdio_printf(&ntstdio, "log file open error %d\n", ret);
 		return;
 	}
 
-	syslog(LOG_NOTICE, "cURL start");
+	ntstdio_printf(&ntstdio, "cURL start\n");
 
 	curl = curl_easy_init();
 	if (curl == NULL) {
-		syslog(LOG_ERROR, "curl_easy_init() failed\n");
+		ntstdio_printf(&ntstdio, "curl_easy_init() failed\n");
 		goto file_close;
 	}
@@ -274,5 +276,5 @@
 	res = curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
 	if (res != CURLE_OK)
-		syslog(LOG_ERROR, "CURLOPT_URL failed: %s\n",
+		ntstdio_printf(&ntstdio, "CURLOPT_URL failed: %s\n",
 			curl_easy_strerror(res));
 
@@ -296,20 +298,20 @@
 	res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
 	if (res != CURLE_OK)
-		syslog(LOG_ERROR, "CURLOPT_SSL_VERIFYPEER failed: %s\n",
+		ntstdio_printf(&ntstdio, "CURLOPT_SSL_VERIFYPEER failed: %s\n",
 			curl_easy_strerror(res));
 #else
 	res = curl_easy_setopt(curl, CURLOPT_CAINFO, "0:/certs/ca-cert.pem");
 	if (res != CURLE_OK)
-		syslog(LOG_ERROR, "CURLOPT_CAINFO failed: %s\n",
+		ntstdio_printf(&ntstdio, "CURLOPT_CAINFO failed: %s\n",
 			curl_easy_strerror(res));
 
 	res = curl_easy_setopt(curl, CURLOPT_SSLCERT, "0:/certs/client-cert.pem");
 	if (res != CURLE_OK)
-		syslog(LOG_ERROR, "CURLOPT_SSLCERT failed: %s\n",
+		ntstdio_printf(&ntstdio, "CURLOPT_SSLCERT failed: %s\n",
 			curl_easy_strerror(res));
 
 	res = curl_easy_setopt(curl, CURLOPT_SSLKEY, "0:/certs/client-key.pem");
 	if (res != CURLE_OK)
-		syslog(LOG_ERROR, "CURLOPT_SSLKEY failed: %s\n",
+		ntstdio_printf(&ntstdio, "CURLOPT_SSLKEY failed: %s\n",
 			curl_easy_strerror(res));
 #endif
@@ -324,5 +326,5 @@
 	res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
 	if (res != CURLE_OK)
-		syslog(LOG_ERROR, "CURLOPT_SSL_VERIFYHOST failed: %s\n",
+		ntstdio_printf(&ntstdio, "CURLOPT_SSL_VERIFYHOST failed: %s\n",
 			curl_easy_strerror(res));
 #endif
@@ -330,5 +332,5 @@
 	/*res = curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy.example.com:8080");
 	if (res != CURLE_OK)
-		syslog(LOG_ERROR, "CURLOPT_PROXY failed: %s\n",
+		ntstdio_printf(&ntstdio, "CURLOPT_PROXY failed: %s\n",
 			curl_easy_strerror(res));*/
 
@@ -356,5 +358,5 @@
 	curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_data);
 
-	syslog(LOG_NOTICE, "cURL perform the request");
+	ntstdio_printf(&ntstdio, "cURL perform the request\n");
 	tslp_tsk(100 * 1000);
 
@@ -363,7 +365,7 @@
 	/* Check for errors */
 	if (res != CURLE_OK) {
-		syslog(LOG_ERROR, "curl_easy_perform() failed: %s\n",
-			curl_easy_strerror(res));
-		syslog(LOG_ERROR, errbuf);
+		ntstdio_printf(&ntstdio, "curl_easy_perform() failed: %s\n",
+			curl_easy_strerror(res));
+		ntstdio_printf(&ntstdio, errbuf);
 	}
 
@@ -371,5 +373,5 @@
 	curl_easy_cleanup(curl);
 
-	syslog(LOG_NOTICE, "cURL end");
+	ntstdio_printf(&ntstdio, "cURL end\n");
 
 file_close:
