Turn off stdout buffering when connecting to editor-server so that the editor properly gets all the server-logging without having to first fill up a buffer. Allows the logs to pipe instantly for easier debugging, and also fixes a problem where the logs wont reach the editor because the buffer doesn't fill
Signed-off-by: Gene Walters <genewalt@amazon.com>
This commit is contained in:
+2321
-18
File diff suppressed because it is too large
Load Diff
@@ -41,7 +41,10 @@ namespace Multiplayer
|
||||
// Automated testing listens for these logs
|
||||
if (editorsv_isDedicated)
|
||||
{
|
||||
// Server logs piped to the editor. Change the buffering policy to ensure every write to stdout is flushed.
|
||||
// Server logs will be piped to the editor so turn off buffering,
|
||||
// otherwise it'll take a lot of logs to fill up the buffer before stdout is finally flushed.
|
||||
// This isn't optimal, but will only affect
|
||||
// Note: _IOLBF (flush on newlines) won't work for Automated Testing which uses a headless server app and will fall back to _IOFBF (full buffering)
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
|
||||
// If the settings registry is not available at this point,
|
||||
|
||||
Reference in New Issue
Block a user