mirror of
https://github.com/moonlight-stream/Internet-Hosting-Tool.git
synced 2026-04-11 18:26:02 +00:00
Print both old and new MISS logs
This commit is contained in:
@@ -70,11 +70,13 @@ void DisplayMessage(const char* message, const char* helpUrl = nullptr, MessageP
|
||||
printf("%s\n", message);
|
||||
|
||||
if (terminal) {
|
||||
printf("--------------- MISS LOG -------------------\n");
|
||||
char missPath[MAX_PATH + 1];
|
||||
FILE* f;
|
||||
|
||||
printf("--------------- CURRENT MISS LOG -------------------\n");
|
||||
|
||||
char missPath[MAX_PATH + 1];
|
||||
ExpandEnvironmentStringsA("%ProgramData%\\MISS\\miss-current.log", missPath, sizeof(missPath));
|
||||
FILE* f = fopen(missPath, "r");
|
||||
f = fopen(missPath, "r");
|
||||
if (f != nullptr) {
|
||||
char buffer[1024];
|
||||
while (!feof(f)) {
|
||||
@@ -84,9 +86,25 @@ void DisplayMessage(const char* message, const char* helpUrl = nullptr, MessageP
|
||||
fclose(f);
|
||||
}
|
||||
else {
|
||||
printf("Failed to find MISS log\n");
|
||||
printf("Failed to find current MISS log\n");
|
||||
}
|
||||
|
||||
printf("\n----------------- OLD MISS LOG ---------------------\n");
|
||||
|
||||
ExpandEnvironmentStringsA("%ProgramData%\\MISS\\miss-old.log", missPath, sizeof(missPath));
|
||||
f = fopen(missPath, "r");
|
||||
if (f != nullptr) {
|
||||
char buffer[1024];
|
||||
while (!feof(f)) {
|
||||
int bytesRead = fread(buffer, 1, ARRAYSIZE(buffer), f);
|
||||
fwrite(buffer, 1, bytesRead, stdout);
|
||||
}
|
||||
fclose(f);
|
||||
}
|
||||
else {
|
||||
printf("Failed to find old MISS log\n");
|
||||
}
|
||||
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user