You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
LiveCoding: Suppress dev channel log messages from console. Add a new server log channel that they are written to instead.
#rb none #jira UE-71257 #ROBOMERGE-OWNER: ryan.gerleve #ROBOMERGE-AUTHOR: ben.marsh #ROBOMERGE-SOURCE: CL 5350628 in //UE4/Release-4.22/... via CL 5364828 #ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking) [CL 5404827 by ben marsh in Dev-Networking branch]
This commit is contained in:
@@ -8,27 +8,45 @@
|
||||
|
||||
IMPLEMENT_MODULE(FLiveCodingServerModule, LiveCodingServer)
|
||||
|
||||
DEFINE_LOG_CATEGORY_STATIC(LogLiveCodingServer, Display, All);
|
||||
|
||||
static void ServerOutputHandler(logging::Channel::Enum Channel, logging::Type::Enum Type, const wchar_t* const Text)
|
||||
{
|
||||
ELiveCodingLogVerbosity Verbosity;
|
||||
FString TrimText = FString(Text).TrimEnd();
|
||||
switch (Type)
|
||||
{
|
||||
case logging::Type::LOG_SUCCESS:
|
||||
Verbosity = ELiveCodingLogVerbosity::Success;
|
||||
break;
|
||||
case logging::Type::LOG_ERROR:
|
||||
Verbosity = ELiveCodingLogVerbosity::Failure;
|
||||
UE_LOG(LogLiveCodingServer, Error, TEXT("%s"), *TrimText);
|
||||
break;
|
||||
case logging::Type::LOG_WARNING:
|
||||
Verbosity = ELiveCodingLogVerbosity::Warning;
|
||||
UE_LOG(LogLiveCodingServer, Warning, TEXT("%s"), *TrimText);
|
||||
break;
|
||||
default:
|
||||
Verbosity = ELiveCodingLogVerbosity::Info;
|
||||
UE_LOG(LogLiveCodingServer, Display, TEXT("%s"), *TrimText);
|
||||
break;
|
||||
}
|
||||
GLiveCodingServer->GetLogOutputDelegate().ExecuteIfBound(Verbosity, Text);
|
||||
}
|
||||
|
||||
if (Channel == logging::Channel::USER)
|
||||
{
|
||||
ELiveCodingLogVerbosity Verbosity;
|
||||
switch (Type)
|
||||
{
|
||||
case logging::Type::LOG_SUCCESS:
|
||||
Verbosity = ELiveCodingLogVerbosity::Success;
|
||||
break;
|
||||
case logging::Type::LOG_ERROR:
|
||||
Verbosity = ELiveCodingLogVerbosity::Failure;
|
||||
break;
|
||||
case logging::Type::LOG_WARNING:
|
||||
Verbosity = ELiveCodingLogVerbosity::Warning;
|
||||
break;
|
||||
default:
|
||||
Verbosity = ELiveCodingLogVerbosity::Info;
|
||||
break;
|
||||
}
|
||||
GLiveCodingServer->GetLogOutputDelegate().ExecuteIfBound(Verbosity, Text);
|
||||
}
|
||||
}
|
||||
|
||||
void FLiveCodingServerModule::StartupModule()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user