mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-21 21:17:19 +00:00
[host] service: disable buffering on the log file
Before this change, the log is buffered, so if the host application exits for any reason, it usually would not show up in the log file immediately, and the service has to be restarted for the logs to be flushed. This commit disables the buffering so that any log entries shows up immediately.
This commit is contained in:
parent
8caf951c41
commit
f9ec32b255
@ -118,6 +118,7 @@ static void setupLogging(void)
|
||||
char * logFilePath = malloc(len + 1);
|
||||
sprintf(logFilePath, "%slooking-glass-host-service.txt", tempPath);
|
||||
service.logFile = fopen(logFilePath, "a+");
|
||||
setbuf(service.logFile, NULL);
|
||||
doLog("Startup\n");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user