2016-12-08 08:52:44 -05:00
|
|
|
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
2014-12-06 19:14:20 -05:00
|
|
|
|
2014-11-19 07:43:07 -05:00
|
|
|
#include "SVisualLoggerLogsList.h"
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
|
|
|
#include "Misc/OutputDeviceHelper.h"
|
|
|
|
|
#include "Widgets/Text/STextBlock.h"
|
2014-12-04 10:00:51 -05:00
|
|
|
#include "LogVisualizerSettings.h"
|
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340)
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3209340 on 2016/11/23 by Ben.Marsh
Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h.
Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms.
* Every header now includes everything it needs to compile.
* There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first.
* There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h.
* Every .cpp file includes its matching .h file first.
* This helps validate that each header is including everything it needs to compile.
* No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more.
* You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there.
* There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible.
* No engine code explicitly includes a precompiled header any more.
* We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies.
* PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files.
Tool used to generate this transform is at Engine\Source\Programs\IncludeTool.
[CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
|
|
|
#include "VisualLoggerDatabase.h"
|
|
|
|
|
#include "LogVisualizerStyle.h"
|
|
|
|
|
#include "Widgets/Views/SListView.h"
|
2014-11-19 07:43:07 -05:00
|
|
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "SVisualLoggerLogsList"
|
|
|
|
|
|
|
|
|
|
struct FLogEntryItem
|
|
|
|
|
{
|
|
|
|
|
FString Category;
|
|
|
|
|
FLinearColor CategoryColor;
|
|
|
|
|
ELogVerbosity::Type Verbosity;
|
|
|
|
|
FString Line;
|
|
|
|
|
int64 UserData;
|
|
|
|
|
FName TagName;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
namespace ELogsSortMode
|
|
|
|
|
{
|
|
|
|
|
enum Type
|
|
|
|
|
{
|
|
|
|
|
ByName,
|
|
|
|
|
ByStartTime,
|
|
|
|
|
ByEndTime,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2015-01-15 06:19:24 -05:00
|
|
|
void SVisualLoggerLogsList::Construct(const FArguments& InArgs, const TSharedRef<FUICommandList>& InCommandList)
|
2014-11-19 07:43:07 -05:00
|
|
|
{
|
|
|
|
|
ChildSlot
|
|
|
|
|
[
|
|
|
|
|
SAssignNew(LogsLinesWidget, SListView<TSharedPtr<FLogEntryItem> >)
|
|
|
|
|
.ItemHeight(20)
|
2015-08-27 05:21:28 -04:00
|
|
|
.ListItemsSource(&CachedLogEntryLines)
|
2014-12-10 09:22:32 -05:00
|
|
|
.SelectionMode(ESelectionMode::Multi)
|
2014-11-19 07:43:07 -05:00
|
|
|
.OnSelectionChanged(this, &SVisualLoggerLogsList::LogEntryLineSelectionChanged)
|
|
|
|
|
.OnGenerateRow(this, &SVisualLoggerLogsList::LogEntryLinesGenerateRow)
|
|
|
|
|
];
|
2015-08-27 05:21:28 -04:00
|
|
|
|
|
|
|
|
FVisualLoggerDatabase::Get().GetEvents().OnItemSelectionChanged.AddRaw(this, &SVisualLoggerLogsList::OnItemSelectionChanged);
|
|
|
|
|
FVisualLoggerDatabase::Get().GetEvents().OnRowSelectionChanged.AddRaw(this, &SVisualLoggerLogsList::ObjectSelectionChanged);
|
|
|
|
|
FLogVisualizer::Get().GetEvents().OnFiltersChanged.AddRaw(this, &SVisualLoggerLogsList::OnFiltersChanged);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SVisualLoggerLogsList::~SVisualLoggerLogsList()
|
|
|
|
|
{
|
|
|
|
|
FVisualLoggerDatabase::Get().GetEvents().OnItemSelectionChanged.RemoveAll(this);
|
|
|
|
|
FVisualLoggerDatabase::Get().GetEvents().OnRowSelectionChanged.RemoveAll(this);
|
|
|
|
|
FLogVisualizer::Get().GetEvents().OnFiltersChanged.RemoveAll(this);
|
2014-11-19 07:43:07 -05:00
|
|
|
}
|
|
|
|
|
|
2014-12-10 09:22:32 -05:00
|
|
|
FReply SVisualLoggerLogsList::OnKeyDown(const FGeometry& MyGeometry, const FKeyEvent& InKeyEvent)
|
|
|
|
|
{
|
|
|
|
|
if (InKeyEvent.GetKey() == EKeys::C && (InKeyEvent.IsLeftCommandDown() || InKeyEvent.IsLeftControlDown()))
|
|
|
|
|
{
|
|
|
|
|
FString ClipboardString;
|
|
|
|
|
for (const TSharedPtr<struct FLogEntryItem>& CurrentItem : LogsLinesWidget->GetSelectedItems())
|
|
|
|
|
{
|
2015-06-02 06:51:31 -04:00
|
|
|
if (CurrentItem->Category.Len() > 0)
|
2016-04-28 13:50:05 -04:00
|
|
|
ClipboardString += CurrentItem->Category + FString(TEXT(" (")) + FString(FOutputDeviceHelper::VerbosityToString(CurrentItem->Verbosity)) + FString(TEXT(") ")) + CurrentItem->Line;
|
2015-06-02 06:51:31 -04:00
|
|
|
else
|
|
|
|
|
ClipboardString += CurrentItem->Line;
|
|
|
|
|
|
2014-12-10 09:22:32 -05:00
|
|
|
ClipboardString += TEXT("\n");
|
|
|
|
|
}
|
|
|
|
|
FPlatformMisc::ClipboardCopy(*ClipboardString);
|
|
|
|
|
return FReply::Handled();
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-11 09:51:31 -04:00
|
|
|
return SVisualLoggerBaseWidget::OnKeyDown(MyGeometry, InKeyEvent);
|
2014-12-10 09:22:32 -05:00
|
|
|
}
|
|
|
|
|
|
2014-11-19 07:43:07 -05:00
|
|
|
void SVisualLoggerLogsList::OnFiltersChanged()
|
|
|
|
|
{
|
2015-08-27 05:21:28 -04:00
|
|
|
RegenerateLogEntries();
|
|
|
|
|
LogsLinesWidget->RequestListRefresh();
|
2014-11-19 07:43:07 -05:00
|
|
|
}
|
|
|
|
|
|
2015-06-02 06:51:31 -04:00
|
|
|
TSharedRef<ITableRow> SVisualLoggerLogsList::LogEntryLinesGenerateRow(TSharedPtr<FLogEntryItem> Item, const TSharedRef<STableViewBase>& OwnerTable)
|
2014-11-19 07:43:07 -05:00
|
|
|
{
|
2015-06-02 06:51:31 -04:00
|
|
|
if (Item->Category.Len() > 0)
|
2014-11-19 07:43:07 -05:00
|
|
|
{
|
2015-06-02 06:51:31 -04:00
|
|
|
return SNew(STableRow< TSharedPtr<FString> >, OwnerTable)
|
|
|
|
|
[
|
|
|
|
|
SNew(SHorizontalBox)
|
|
|
|
|
+ SHorizontalBox::Slot()
|
|
|
|
|
.AutoWidth()
|
|
|
|
|
.Padding(FMargin(5.0f, 0.0f))
|
|
|
|
|
[
|
|
|
|
|
SNew(STextBlock)
|
|
|
|
|
.ColorAndOpacity(FSlateColor(Item->CategoryColor))
|
|
|
|
|
.Text(FText::FromString(Item->Category))
|
|
|
|
|
.HighlightText(this, &SVisualLoggerLogsList::GetFilterText)
|
|
|
|
|
]
|
|
|
|
|
+ SHorizontalBox::Slot()
|
|
|
|
|
.AutoWidth()
|
|
|
|
|
.Padding(FMargin(5.0f, 0.0f))
|
|
|
|
|
[
|
|
|
|
|
SNew(STextBlock)
|
|
|
|
|
.ColorAndOpacity(FSlateColor(Item->Verbosity == ELogVerbosity::Error ? FLinearColor::Red : (Item->Verbosity == ELogVerbosity::Warning ? FLinearColor::Yellow : FLinearColor::Gray)))
|
2016-04-28 13:50:05 -04:00
|
|
|
.Text(FText::FromString(FString(TEXT("(")) + FString(FOutputDeviceHelper::VerbosityToString(Item->Verbosity)) + FString(TEXT(")"))))
|
2015-06-02 06:51:31 -04:00
|
|
|
]
|
|
|
|
|
+ SHorizontalBox::Slot()
|
|
|
|
|
.Padding(FMargin(5.0f, 0.0f))
|
|
|
|
|
[
|
|
|
|
|
SNew(STextBlock)
|
|
|
|
|
.AutoWrapText(true)
|
|
|
|
|
.ColorAndOpacity(FSlateColor(Item->Verbosity == ELogVerbosity::Error ? FLinearColor::Red : (Item->Verbosity == ELogVerbosity::Warning ? FLinearColor::Yellow : FLinearColor::Gray)))
|
|
|
|
|
.Text(FText::FromString(Item->Line))
|
|
|
|
|
.HighlightText(this, &SVisualLoggerLogsList::GetFilterText)
|
2015-06-10 03:23:45 -04:00
|
|
|
.TextStyle(FLogVisualizerStyle::Get(), TEXT("TextLogs.Text"))
|
2015-06-02 06:51:31 -04:00
|
|
|
]
|
|
|
|
|
];
|
|
|
|
|
|
2015-04-24 07:10:23 -04:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2015-06-02 06:51:31 -04:00
|
|
|
return SNew(STableRow< TSharedPtr<FString> >, OwnerTable)
|
|
|
|
|
[
|
|
|
|
|
SNew(SHorizontalBox)
|
|
|
|
|
+ SHorizontalBox::Slot()
|
|
|
|
|
.Padding(FMargin(5.0f, 0.0f))
|
|
|
|
|
[
|
|
|
|
|
SNew(STextBlock)
|
|
|
|
|
/*.AutoWrapText(true)*/
|
|
|
|
|
.ColorAndOpacity(FSlateColor(FLinearColor::White))
|
|
|
|
|
.Text(FText::FromString(Item->Line))
|
|
|
|
|
.HighlightText(this, &SVisualLoggerLogsList::GetFilterText)
|
|
|
|
|
.Justification(ETextJustify::Center)
|
|
|
|
|
]
|
|
|
|
|
];
|
2014-11-19 07:43:07 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-12-04 10:00:51 -05:00
|
|
|
FText SVisualLoggerLogsList::GetFilterText() const
|
|
|
|
|
{
|
|
|
|
|
static FText NoText;
|
|
|
|
|
const bool bSearchInsideLogs = ULogVisualizerSettings::StaticClass()->GetDefaultObject<ULogVisualizerSettings>()->bSearchInsideLogs;
|
2015-08-27 05:21:28 -04:00
|
|
|
return bSearchInsideLogs ? FText::FromString(FVisualLoggerFilters::Get().GetSearchString()) : NoText;
|
2014-12-04 10:00:51 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SVisualLoggerLogsList::OnFiltersSearchChanged(const FText& Filter)
|
|
|
|
|
{
|
|
|
|
|
OnFiltersChanged();
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-02 06:51:31 -04:00
|
|
|
void SVisualLoggerLogsList::LogEntryLineSelectionChanged(TSharedPtr<FLogEntryItem> SelectedItem, ESelectInfo::Type SelectInfo)
|
|
|
|
|
{
|
|
|
|
|
if (SelectedItem.IsValid() == true)
|
|
|
|
|
{
|
2015-08-27 05:21:28 -04:00
|
|
|
FLogVisualizer::Get().GetEvents().OnLogLineSelectionChanged.ExecuteIfBound(SelectedItem, SelectedItem->UserData, SelectedItem->TagName);
|
2015-06-02 06:51:31 -04:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2015-08-27 05:21:28 -04:00
|
|
|
FLogVisualizer::Get().GetEvents().OnLogLineSelectionChanged.ExecuteIfBound(SelectedItem, 0, NAME_None);
|
2015-06-02 06:51:31 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-08-27 05:21:28 -04:00
|
|
|
void SVisualLoggerLogsList::ObjectSelectionChanged(const TArray<FName>&)
|
2015-06-02 06:51:31 -04:00
|
|
|
{
|
2015-08-27 05:21:28 -04:00
|
|
|
RegenerateLogEntries();
|
2015-06-02 06:51:31 -04:00
|
|
|
LogsLinesWidget->RequestListRefresh();
|
|
|
|
|
}
|
|
|
|
|
|
2015-08-27 05:21:28 -04:00
|
|
|
void SVisualLoggerLogsList::ResetData()
|
2014-11-19 07:43:07 -05:00
|
|
|
{
|
2015-08-27 05:21:28 -04:00
|
|
|
CachedLogEntryLines.Reset();
|
|
|
|
|
LogsLinesWidget->RequestListRefresh();
|
|
|
|
|
}
|
2014-11-19 07:43:07 -05:00
|
|
|
|
2015-08-27 05:21:28 -04:00
|
|
|
void SVisualLoggerLogsList::OnItemSelectionChanged(const FVisualLoggerDBRow& BDRow, int32 ItemIndex)
|
|
|
|
|
{
|
|
|
|
|
RegenerateLogEntries();
|
|
|
|
|
}
|
2015-06-02 06:51:31 -04:00
|
|
|
|
2015-08-27 05:21:28 -04:00
|
|
|
void SVisualLoggerLogsList::RegenerateLogEntries()
|
|
|
|
|
{
|
|
|
|
|
CachedLogEntryLines.Reset();
|
|
|
|
|
|
|
|
|
|
const TArray<FName> SelectedRows = FVisualLoggerDatabase::Get().GetSelectedRows();
|
|
|
|
|
for (FName CurrentRow : SelectedRows)
|
2015-06-02 06:51:31 -04:00
|
|
|
{
|
2015-08-27 05:21:28 -04:00
|
|
|
if (FVisualLoggerDatabase::Get().IsRowVisible(CurrentRow) == false)
|
2015-06-02 06:51:31 -04:00
|
|
|
{
|
2015-08-27 05:21:28 -04:00
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const FVisualLoggerDBRow& DBRow = FVisualLoggerDatabase::Get().GetRowByName(CurrentRow);
|
|
|
|
|
const TArray<FVisualLogDevice::FVisualLogEntryItem>& Entries = FVisualLoggerDatabase::Get().GetRowByName(CurrentRow).GetItems();
|
|
|
|
|
|
|
|
|
|
int32 BestItemIndex = INDEX_NONE;
|
|
|
|
|
float BestDistance = MAX_FLT;
|
|
|
|
|
for (int32 Index = 0; Index < Entries.Num(); Index++)
|
|
|
|
|
{
|
|
|
|
|
auto& CurrentEntryItem = Entries[Index];
|
|
|
|
|
if (DBRow.IsItemVisible(Index) == false)
|
2015-06-02 06:51:31 -04:00
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
2015-08-27 05:21:28 -04:00
|
|
|
TArray<FVisualLoggerCategoryVerbosityPair> OutCategories;
|
|
|
|
|
const float CurrentDist = DBRow.GetCurrentItemIndex() == INDEX_NONE ? 0 : FMath::Abs(CurrentEntryItem.Entry.TimeStamp - DBRow.GetCurrentItem().Entry.TimeStamp);
|
|
|
|
|
if (CurrentDist < BestDistance)
|
2015-06-02 06:51:31 -04:00
|
|
|
{
|
2015-08-27 05:21:28 -04:00
|
|
|
BestDistance = CurrentDist;
|
|
|
|
|
BestItemIndex = Index;
|
2015-06-02 06:51:31 -04:00
|
|
|
}
|
2015-08-27 05:21:28 -04:00
|
|
|
}
|
2015-06-02 06:51:31 -04:00
|
|
|
|
2015-08-27 05:21:28 -04:00
|
|
|
if (Entries.IsValidIndex(BestItemIndex))
|
|
|
|
|
{
|
|
|
|
|
GenerateLogs(Entries[BestItemIndex], SelectedRows.Num() > 1);
|
2015-06-02 06:51:31 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SVisualLoggerLogsList::GenerateLogs(const FVisualLogDevice::FVisualLogEntryItem& LogEntry, bool bGenerateHeader)
|
|
|
|
|
{
|
2014-11-19 07:43:07 -05:00
|
|
|
TArray<FVisualLoggerCategoryVerbosityPair> OutCategories;
|
|
|
|
|
FVisualLoggerHelpers::GetCategories(LogEntry.Entry, OutCategories);
|
2015-02-27 07:26:07 -05:00
|
|
|
bool bHasValidCategory = false;
|
|
|
|
|
for (auto& CurrentCategory : OutCategories)
|
|
|
|
|
{
|
2015-08-27 05:21:28 -04:00
|
|
|
bHasValidCategory |= FVisualLoggerFilters::Get().MatchCategoryFilters(CurrentCategory.CategoryName.ToString(), CurrentCategory.Verbosity);
|
2015-02-27 07:26:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!bHasValidCategory)
|
2014-11-19 07:43:07 -05:00
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-02 06:51:31 -04:00
|
|
|
if (bGenerateHeader)
|
|
|
|
|
{
|
|
|
|
|
FLogEntryItem EntryItem;
|
|
|
|
|
EntryItem.Category = FString();
|
|
|
|
|
EntryItem.CategoryColor = FLinearColor::Black;
|
|
|
|
|
EntryItem.Verbosity = ELogVerbosity::VeryVerbose;
|
|
|
|
|
EntryItem.Line = LogEntry.OwnerName.ToString();
|
|
|
|
|
EntryItem.UserData = 0;
|
|
|
|
|
EntryItem.TagName = NAME_None;
|
2015-08-27 05:21:28 -04:00
|
|
|
CachedLogEntryLines.Add(MakeShareable(new FLogEntryItem(EntryItem)));
|
2015-06-02 06:51:31 -04:00
|
|
|
}
|
|
|
|
|
|
2014-11-19 07:43:07 -05:00
|
|
|
const FVisualLogLine* LogLine = LogEntry.Entry.LogLines.GetData();
|
2015-02-27 07:26:07 -05:00
|
|
|
const bool bSearchInsideLogs = ULogVisualizerSettings::StaticClass()->GetDefaultObject<ULogVisualizerSettings>()->bSearchInsideLogs;
|
2014-11-19 07:43:07 -05:00
|
|
|
for (int LineIndex = 0; LineIndex < LogEntry.Entry.LogLines.Num(); ++LineIndex, ++LogLine)
|
|
|
|
|
{
|
2015-08-27 05:21:28 -04:00
|
|
|
bool bShowLine = FVisualLoggerFilters::Get().MatchCategoryFilters(LogLine->Category.ToString(), LogLine->Verbosity);
|
2015-02-27 07:26:07 -05:00
|
|
|
if (bSearchInsideLogs)
|
|
|
|
|
{
|
2015-08-27 05:21:28 -04:00
|
|
|
FString String = FVisualLoggerFilters::Get().GetSearchString();
|
2015-02-27 07:26:07 -05:00
|
|
|
if (String.Len() > 0)
|
|
|
|
|
{
|
|
|
|
|
bShowLine &= LogLine->Line.Find(String) != INDEX_NONE || LogLine->Category.ToString().Find(String) != INDEX_NONE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-11-19 07:43:07 -05:00
|
|
|
|
|
|
|
|
if (bShowLine)
|
|
|
|
|
{
|
|
|
|
|
FLogEntryItem EntryItem;
|
|
|
|
|
EntryItem.Category = LogLine->Category.ToString();
|
2015-01-15 06:19:24 -05:00
|
|
|
EntryItem.CategoryColor = FLogVisualizer::Get().GetColorForCategory(LogLine->Category.ToString());
|
2014-11-19 07:43:07 -05:00
|
|
|
EntryItem.Verbosity = LogLine->Verbosity;
|
|
|
|
|
EntryItem.Line = LogLine->Line;
|
|
|
|
|
EntryItem.UserData = LogLine->UserData;
|
|
|
|
|
EntryItem.TagName = LogLine->TagName;
|
|
|
|
|
|
2015-08-27 05:21:28 -04:00
|
|
|
CachedLogEntryLines.Add(MakeShareable(new FLogEntryItem(EntryItem)));
|
2014-11-19 07:43:07 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (auto& Event : LogEntry.Entry.Events)
|
|
|
|
|
{
|
2015-08-27 05:21:28 -04:00
|
|
|
bool bShowLine = FVisualLoggerFilters::Get().MatchCategoryFilters(Event.Name, Event.Verbosity);
|
2014-11-19 07:43:07 -05:00
|
|
|
|
|
|
|
|
if (bShowLine)
|
|
|
|
|
{
|
|
|
|
|
FLogEntryItem EntryItem;
|
|
|
|
|
EntryItem.Category = Event.Name;
|
2015-01-15 06:19:24 -05:00
|
|
|
EntryItem.CategoryColor = FLogVisualizer::Get().GetColorForCategory(*EntryItem.Category);
|
2014-11-19 07:43:07 -05:00
|
|
|
EntryItem.Verbosity = Event.Verbosity;
|
|
|
|
|
EntryItem.Line = FString::Printf(TEXT("Registered event: '%s' (%d times)%s"), *Event.Name, Event.Counter, Event.EventTags.Num() ? TEXT("\n") : TEXT(""));
|
|
|
|
|
for (auto& EventTag : Event.EventTags)
|
|
|
|
|
{
|
|
|
|
|
EntryItem.Line += FString::Printf(TEXT("%d times for tag: '%s'\n"), EventTag.Value, *EventTag.Key.ToString());
|
|
|
|
|
}
|
|
|
|
|
EntryItem.UserData = Event.UserData;
|
|
|
|
|
EntryItem.TagName = Event.TagName;
|
|
|
|
|
|
2015-08-27 05:21:28 -04:00
|
|
|
CachedLogEntryLines.Add(MakeShareable(new FLogEntryItem(EntryItem)));
|
2014-11-19 07:43:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LogsLinesWidget->RequestListRefresh();
|
|
|
|
|
}
|
2014-11-19 09:04:58 -05:00
|
|
|
#undef LOCTEXT_NAMESPACE
|