AzCoreLogSink will check if it's running in an editor-server and will allow stdouts

Signed-off-by: Gene Walters <genewalt@amazon.com>
This commit is contained in:
Gene Walters
2021-11-20 14:48:48 -08:00
parent 6005a4e08b
commit 02590a1766
3 changed files with 13 additions and 4 deletions
+2 -2
View File
@@ -535,10 +535,10 @@ namespace AZ::Debug
EBUS_EVENT(TraceMessageDrillerBus, OnOutput, window, message);
TraceMessageResult result;
EBUS_EVENT_RESULT(result, TraceMessageBus, OnOutput, window, message);
/* if (result.m_value)
if (result.m_value)
{
return;
}*/
}
}
RawOutput(window, message);
+11
View File
@@ -180,6 +180,17 @@ public:
CryLog("(%s) - %s", window, message);
}
// If this is an editor-server, then allow the default trace behavior (fwrites to stdout) to occur
// The editor will being listening to the stdout of this server
if (const auto console = AZ::Interface<AZ::IConsole>::Get())
{
bool editorsv_isDedicated = false;
if (console->GetCvarValue("editorsv_isDedicated", editorsv_isDedicated) == AZ::GetValueResult::Success)
{
return !editorsv_isDedicated;
}
}
return true; // suppress default AzCore behavior.
}
@@ -420,8 +420,6 @@ namespace Multiplayer
void MultiplayerEditorSystemComponent::OnTick(float, AZ::ScriptTimePoint)
{
AZ_TracePrintf("MultiplayerEditorSystemComponent", "OnTick Pump");
m_serverProcessTracePrinter->Pump();
}