From 28c330ab959471bb68d8b230f8c989a9ac676404 Mon Sep 17 00:00:00 2001
From: open-license-manager <rillf@maildrop.cc>
Date: 周一, 08 9月 2014 06:07:27 +0800
Subject: [PATCH] logs

---
 src/library/os/win/os-win.c |   19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/src/library/os/win/os-win.c b/src/library/os/win/os-win.c
index a4d738a..246c0c8 100644
--- a/src/library/os/win/os-win.c
+++ b/src/library/os/win/os-win.c
@@ -1,5 +1,6 @@
 #include <Windows.h>
 #include <iphlpapi.h>
+#include "../../base/logger.h"
 #include"../os.h"
 #pragma comment(lib, "IPHLPAPI.lib")
 
@@ -51,13 +52,11 @@
 				success = GetVolumeInformation(szSingleDrive, volName, MAX_PATH, &volSerial,
 					&FileMaxLen, &FileFlags, FileSysName, MAX_PATH);
 				if (success) {
-#ifdef _DEBUG
-					printf("drive         : %s\n", szSingleDrive);
-					printf("Volume Name   : %s\n", volName);
-					printf("Volume Serial : 0x%x\n", volSerial);
-					printf("Max file length : %d\n", FileMaxLen);
-					printf("Filesystem      : %s\n", FileSysName);
-#endif
+					LOG_INFO("drive         : %s\n", szSingleDrive);
+					LOG_INFO("Volume Name   : %s\n", volName);
+					LOG_INFO("Volume Serial : 0x%x\n", volSerial);
+					LOG_DEBUG("Max file length : %d\n", FileMaxLen);
+					LOG_DEBUG("Filesystem      : %s\n", FileSysName);
 					if (diskInfos != NULL && * disk_info_size<ndrives){
 						strncpy(diskInfos[ndrives].device,volName,MAX_PATH);
 						strncpy(diskInfos[ndrives].label, FileSysName , MAX_PATH);
@@ -68,12 +67,10 @@
 					ndrives++;
 				}
 				else {
-					printf("Unable to retreive information of '%s'\n", szSingleDrive);
+					LOG_WARN("Unable to retrieve information of '%s'\n", szSingleDrive);
 				}
 			}
-#ifdef _DEBUG
-			printf("This volume is not a fixed disk : %s\n", szSingleDrive);
-#endif
+			LOG_INFO("This volume is not fixed : %s, type: %d\n", szSingleDrive);
 			szSingleDrive += strlen(szSingleDrive) + 1;
 		}
 	}

--
Gitblit v1.9.1