Merge branch 'LYN-8514_AutomatedReviewServerLogChecks' into LYN-6769_TestingRPCs

This commit is contained in:
Gene Walters
2021-12-07 14:55:18 -08:00
4 changed files with 9 additions and 13 deletions
@@ -119,25 +119,21 @@ namespace AZ
void LoggerSystemComponent::LogInternalV(LogLevel level, const char* format, const char* file, const char* function, int32_t line, va_list args)
{
constexpr AZStd::size_t MaxLogBufferSize = 1000;
char buffer[MaxLogBufferSize];
auto buffer = AZStd::fixed_string<MaxLogBufferSize>::format_arg(format, args);
m_logEvent.Signal(level, buffer.c_str(), file, function, line);
buffer += '\n';
const AZStd::size_t length = azvsnprintf(buffer, MaxLogBufferSize, format, args);
buffer[AZStd::min<AZStd::size_t>(length + 1, MaxLogBufferSize - 1)] = '\0';
m_logEvent.Signal(level, buffer, file, function, line);
// Force a new-line before calling the AZ::Debug::Trace functions, as they assume a newline is present
buffer[AZStd::min<AZStd::size_t>(length + 1, MaxLogBufferSize - 2)] = '\n';
switch (level)
{
case LogLevel::Warn:
AZ_Warning("Logger", true, buffer);
AZ_Warning("Logger", true, buffer.c_str());
break;
case LogLevel::Error:
AZ_Error("Logger", true, buffer);
AZ_Error("Logger", true, buffer.c_str());
break;
default:
// Catch all else with trace
AZ::Debug::Trace::Output("Logger", buffer);
AZ::Debug::Trace::Output("Logger", buffer.c_str());
break;
}
}
@@ -92,7 +92,7 @@ namespace AzNetworking
return InvalidConnectionId;
}
AZLOG_INFO("Adding new socket %d\n", static_cast<int32_t>(tcpSocket->GetSocketFd()));
AZLOG_INFO("Adding new socket %d", static_cast<int32_t>(tcpSocket->GetSocketFd()));
connection->SendReliablePacket(CorePackets::InitiateConnectionPacket());
m_connectionListener.OnConnect(connection.get());
m_connectionSet.AddConnection(AZStd::move(connection));
@@ -161,7 +161,7 @@ namespace Multiplayer
networkInterface->Listen(sv_port);
AZLOG_INFO("Editor Server completed receiving the editor's level assets, responding to Editor...\n")
AZLOG_INFO("Editor Server completed receiving the editor's level assets, responding to Editor...")
return connection->SendReliablePacket(MultiplayerEditorPackets::EditorServerReady());
}
@@ -857,7 +857,7 @@ namespace Multiplayer
EnableAutonomousControl(controlledEntity, AzNetworking::InvalidConnectionId);
}
AZLOG_INFO("Multiplayer operating in %s mode\n", GetEnumString(m_agentType));
AZLOG_INFO("Multiplayer operating in %s mode", GetEnumString(m_agentType));
}
void MultiplayerSystemComponent::AddClientMigrationStartEventHandler(ClientMigrationStartEvent::Handler& handler)