mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-21 21:17:19 +00:00
[host] windows: log to stderr that logs will continue in file
This prevents users from posting the stderr as if it's the only output.
This commit is contained in:
parent
f519904c38
commit
e1ebde3cd2
@ -526,7 +526,13 @@ bool app_init(void)
|
||||
|
||||
// redirect stderr to a file
|
||||
if (logFile && strcmp(logFile, "stderr") != 0)
|
||||
freopen(logFile, "a", stderr);
|
||||
{
|
||||
DEBUG_INFO("Logs will be written to: %s", logFile);
|
||||
DEBUG_INFO("Please see there for any further information");
|
||||
|
||||
if (!freopen(logFile, "a", stderr))
|
||||
DEBUG_WARN("Failed to open log file, will log to stderr");
|
||||
}
|
||||
|
||||
// always flush stderr
|
||||
setbuf(stderr, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user