Remove Display Duration from Format Log Message
This commit is contained in:
@@ -18,7 +18,7 @@ ELogVerbosity::Type UlxBlueprintErrorLibrary::ConvertElxLogVerbosity(ElxLogVerbo
|
||||
}
|
||||
}
|
||||
|
||||
void UlxBlueprintErrorLibrary::FormatErrorInternal(UObject *Context, ElxLogVerbosity Verbosity, ElxErrorDisplayDuration DisplayDuration, const FString &InPattern, TArray<FFormatArgumentData> InArgs)
|
||||
void UlxBlueprintErrorLibrary::FormatErrorInternal(UObject *Context, ElxLogVerbosity Verbosity, const FString &InPattern, TArray<FFormatArgumentData> InArgs)
|
||||
{
|
||||
// Generate the formatted string.
|
||||
//
|
||||
@@ -26,21 +26,6 @@ void UlxBlueprintErrorLibrary::FormatErrorInternal(UObject *Context, ElxLogVerbo
|
||||
FText Message = FTextFormatter::Format(MoveTemp(InPatternText), MoveTemp(InArgs), false, false);
|
||||
FString MessageString = Message.ToString();
|
||||
|
||||
// Convert the DisplayDuration enum into a number of seconds.
|
||||
//
|
||||
int Seconds = int(DisplayDuration);
|
||||
if (Seconds > 100) Seconds = (Seconds - 100) * 60;
|
||||
|
||||
// Choose a color appropriate to the verbosity level.
|
||||
//
|
||||
FLinearColor Color;
|
||||
switch (Verbosity) {
|
||||
case ElxLogVerbosity::Fatal : Color = FLinearColor(1.0, 0.6, 0.6); break;
|
||||
case ElxLogVerbosity::Error : Color = FLinearColor(1.0, 0.6, 0.6); break;
|
||||
case ElxLogVerbosity::Warning : Color = FLinearColor(0.9, 0.9, 0.6); break;
|
||||
default: Color = FLinearColor(0.8, 0.8, 0.8); break;
|
||||
}
|
||||
|
||||
// Get the blueprint name.
|
||||
//
|
||||
// Normally, the log function expects you to pass in a filename, and a log
|
||||
@@ -59,13 +44,6 @@ void UlxBlueprintErrorLibrary::FormatErrorInternal(UObject *Context, ElxLogVerbo
|
||||
auto BlueprintNameAnsi = StringCast<ANSICHAR>(*BlueprintNameString);
|
||||
FLogCategoryName BlueprintNameLogCategory(Context->GetClass()->GetFName());
|
||||
|
||||
// Output to Screen, if requested.
|
||||
//
|
||||
if (Seconds != 0)
|
||||
{
|
||||
UKismetSystemLibrary::PrintText(NULL, Message, true, false, Color, Seconds, NAME_None);
|
||||
}
|
||||
|
||||
// Output to Log
|
||||
//
|
||||
ELogVerbosity::Type VerbosityValue = ConvertElxLogVerbosity(Verbosity);
|
||||
|
||||
Reference in New Issue
Block a user