Merge pull request #6066 from aws-lumberyard-dev/LYN-8514_AutomatedReviewServerLogChecks
Updating Multiplayer PyTests To Check Server Logs
This commit is contained in:
@@ -243,7 +243,7 @@ namespace AZ
|
||||
|
||||
if (StringFunc::StartsWith(curr->m_name, command, false))
|
||||
{
|
||||
AZLOG_INFO("- %s : %s\n", curr->m_name, curr->m_desc);
|
||||
AZLOG_INFO("- %s : %s", curr->m_name, curr->m_desc);
|
||||
|
||||
if (commandSubset.size() < MaxConsoleCommandPlusArgsLength)
|
||||
{
|
||||
@@ -433,29 +433,29 @@ namespace AZ
|
||||
{
|
||||
if ((curr->GetFlags() & requiredSet) != requiredSet)
|
||||
{
|
||||
AZLOG_WARN("%s failed required set flag check\n", curr->m_name);
|
||||
AZLOG_WARN("%s failed required set flag check", curr->m_name);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((curr->GetFlags() & requiredClear) != ConsoleFunctorFlags::Null)
|
||||
{
|
||||
AZLOG_WARN("%s failed required clear flag check\n", curr->m_name);
|
||||
AZLOG_WARN("%s failed required clear flag check", curr->m_name);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((curr->GetFlags() & ConsoleFunctorFlags::IsCheat) != ConsoleFunctorFlags::Null)
|
||||
{
|
||||
AZLOG_WARN("%s is marked as a cheat\n", curr->m_name);
|
||||
AZLOG_WARN("%s is marked as a cheat", curr->m_name);
|
||||
}
|
||||
|
||||
if ((curr->GetFlags() & ConsoleFunctorFlags::IsDeprecated) != ConsoleFunctorFlags::Null)
|
||||
{
|
||||
AZLOG_WARN("%s is marked as deprecated\n", curr->m_name);
|
||||
AZLOG_WARN("%s is marked as deprecated", curr->m_name);
|
||||
}
|
||||
|
||||
if ((curr->GetFlags() & ConsoleFunctorFlags::NeedsReload) != ConsoleFunctorFlags::Null)
|
||||
{
|
||||
AZLOG_WARN("Changes to %s will only take effect after level reload\n", curr->m_name);
|
||||
AZLOG_WARN("Changes to %s will only take effect after level reload", curr->m_name);
|
||||
}
|
||||
|
||||
// Letting this intentionally fall-through, since in editor we can register common variables multiple times
|
||||
@@ -468,7 +468,7 @@ namespace AZ
|
||||
{
|
||||
CVarFixedString value;
|
||||
curr->GetValue(value);
|
||||
AZLOG_INFO("> %s : %s\n", curr->GetName(), value.empty() ? "<empty>" : value.c_str());
|
||||
AZLOG_INFO("> %s : %s", curr->GetName(), value.empty() ? "<empty>" : value.c_str());
|
||||
}
|
||||
flags = curr->GetFlags();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1080,7 +1080,7 @@ AZ_POP_DISABLE_WARNING
|
||||
{
|
||||
m_pUserCallback->OnInitProgress("Initializing additional systems...");
|
||||
}
|
||||
AZ_Printf(AZ_TRACE_SYSTEM_WINDOW, "Initializing additional systems");
|
||||
AZ_Printf(AZ_TRACE_SYSTEM_WINDOW, "Initializing additional systems\n");
|
||||
|
||||
|
||||
InlineInitializationProcessing("CSystem::Init AIInit");
|
||||
|
||||
Reference in New Issue
Block a user