[SYSSETUP]
[reactos.git] / reactos / dll / win32 / syssetup / logfile.c
index ea0db8e..5a941d0 100644 (file)
@@ -97,6 +97,8 @@ SYSSETUP_LogItem(IN const LPSTR lpFileName,
     DWORD dwMessageSize;
     DWORD dwWritten;
     CHAR Buffer[6];
     DWORD dwMessageSize;
     DWORD dwWritten;
     CHAR Buffer[6];
+    CHAR TimeBuffer[30];
+    SYSTEMTIME stTime;
 
     /* Get the severity code string */
     switch (dwSeverity)
 
     /* Get the severity code string */
     switch (dwSeverity)
@@ -148,6 +150,28 @@ SYSSETUP_LogItem(IN const LPSTR lpFileName,
                    NULL,
                    FILE_END);
 
                    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,
     /* Write file name */
     WriteFile(hLogFile,
               lpFileName,