mirror of
https://github.com/moonlight-stream/Internet-Hosting-Tool.git
synced 2025-07-01 23:35:27 +00:00
Add UTC time prefix to logs
This commit is contained in:
parent
6916cfd0de
commit
a7e41d15f5
@ -746,6 +746,8 @@ void ResetLogFile()
|
||||
{
|
||||
char oldLogFilePath[MAX_PATH + 1];
|
||||
char currentLogFilePath[MAX_PATH + 1];
|
||||
char timeString[MAX_PATH + 1] = {};
|
||||
SYSTEMTIME time;
|
||||
|
||||
ExpandEnvironmentStringsA("%ProgramData%\\MISS\\miss-old.log", oldLogFilePath, sizeof(oldLogFilePath));
|
||||
ExpandEnvironmentStringsA("%ProgramData%\\MISS\\miss-current.log", currentLogFilePath, sizeof(currentLogFilePath));
|
||||
@ -761,6 +763,11 @@ void ResetLogFile()
|
||||
|
||||
// Print a log header
|
||||
printf("Moonlight Internet Streaming Service v" VER_VERSION_STR NL);
|
||||
|
||||
// Print the current time
|
||||
GetSystemTime(&time);
|
||||
GetTimeFormatA(LOCALE_SYSTEM_DEFAULT, 0, &time, "hh':'mm':'ss tt", timeString, ARRAYSIZE(timeString));
|
||||
printf("The current UTC time is: %s" NL, timeString);
|
||||
}
|
||||
|
||||
DWORD WINAPI GameStreamStateChangeThread(PVOID Context)
|
||||
|
@ -617,6 +617,8 @@ bool IsDoubleNAT(PSOCKADDR_IN wanAddr)
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
WSADATA wsaData;
|
||||
SYSTEMTIME time;
|
||||
char timeString[MAX_PATH + 1] = {};
|
||||
|
||||
char tempPath[MAX_PATH + 1];
|
||||
GetTempPathA(sizeof(tempPath), tempPath);
|
||||
@ -627,6 +629,11 @@ int main(int argc, char* argv[])
|
||||
// Print a log header
|
||||
printf("Moonlight Internet Streaming Tester v" VER_VERSION_STR "\n");
|
||||
|
||||
// Print the current time
|
||||
GetSystemTime(&time);
|
||||
GetTimeFormatA(LOCALE_SYSTEM_DEFAULT, 0, &time, "hh':'mm':'ss tt", timeString, ARRAYSIZE(timeString));
|
||||
printf("The current UTC time is: %s\n", timeString);
|
||||
|
||||
// Print a console header
|
||||
fprintf(stderr, "Moonlight Internet Streaming Tester v" VER_VERSION_STR "\n\n");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user