Author: ekohl
Date: Sat Feb 22 13:58:33 2014
New Revision: 62289
URL:
http://svn.reactos.org/svn/reactos?rev=62289&view=rev
Log:
[SYSSETUP]
Add date/time to setuplog.txt. Patch by Lee Schroeder. Thanks a lot!
CORE-7927 #resolve
Modified:
trunk/reactos/dll/win32/syssetup/logfile.c
Modified: trunk/reactos/dll/win32/syssetup/logfile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/logfile…
==============================================================================
--- trunk/reactos/dll/win32/syssetup/logfile.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/syssetup/logfile.c [iso-8859-1] Sat Feb 22 13:58:33 2014
@@ -97,6 +97,8 @@
DWORD dwMessageSize;
DWORD dwWritten;
CHAR Buffer[6];
+ CHAR TimeBuffer[30];
+ SYSTEMTIME stTime;
/* Get the severity code string */
switch (dwSeverity)
@@ -148,6 +150,28 @@
NULL,
FILE_END);
+ /* Write Time/Date */
+ GetLocalTime(&stTime);
+
+ snprintf(TimeBuffer, sizeof(TimeBuffer),
+ "%02d/%02d/%02d %02d:%02d:%02d.%03d",
+ stTime.wMonth,
+ stTime.wDay,
+ stTime.wYear,
+ stTime.wHour,
+ stTime.wMinute,
+ stTime.wSecond,
+ stTime.wMilliseconds);
+
+ WriteFile(hLogFile,
+ TimeBuffer,
+ strlen(TimeBuffer),
+ &dwWritten,
+ NULL);
+
+ /* Write comma */
+ WriteFile(hLogFile, ",", 1, &dwWritten, NULL);
+
/* Write file name */
WriteFile(hLogFile,
lpFileName,