Only enable stdout/stderr log output after main initialisation

* This suppresses lines like "RenderDoc v0.31 x64 (...) loaded in replay
  application" which are only useful for the logfile and not for actual
  user output.
This commit is contained in:
baldurk committed 2016-08-25 21:07:40 +02:00
1 parent bbcc9960ee
commit ced197abe3
3 files changed
+16 -2

No files matched your search

+9 -2
View File
@@ -272,6 +272,13 @@ void rdclog_filename(const char *filename)
logfile() = filename;
}
static bool log_output_enabled = false;
void rdclog_enableoutput()
{
log_output_enabled = true;
}
void rdclog_flush()
{
}
@@ -287,12 +294,12 @@ void rdclogprint_int(LogType type, const char *fullMsg, const char *msg)
#endif
#if defined(OUTPUT_LOG_TO_STDOUT)
// don't output debug messages to stdout/stderr
if(type != RDCLog_Debug)
if(type != RDCLog_Debug && log_output_enabled)
OSUtility::WriteOutput(OSUtility::Output_StdOut, msg);
#endif
#if defined(OUTPUT_LOG_TO_STDERR)
// don't output debug messages to stdout/stderr
if(type != RDCLog_Debug)
if(type != RDCLog_Debug && log_output_enabled)
OSUtility::WriteOutput(OSUtility::Output_StdErr, msg);
#endif
#if defined(OUTPUT_LOG_TO_DISK)