[BUG] Output Log won't stay scrolled to the bottom

In the past, scrolling down to the bottom of the Output Log would “snap” your view to the bottom, showing every new message. This no longer works. Just another thing to fix for 4.12.1! :stuck_out_tongue:

Hi Kowbell,

I was able to reproduce this issue and have entered the following bug report: UE-31688. When this issue has been resolved, we will notify you with an update to this post.

Thanks for making us aware of this issue.

.

Hi , just wondering if this issue was resolved in a previous update? I’m still having the same issue in 4.12.5.

This is has been verified fixed for UE4.13. Providing no other updates to the engine affect this fix, you can expect it to be present in the official release.

Hi!

I am working with 4.13.1. Normally the fix works for me.

However, if I change the filters (uncheck one from Messages | Warnings | Errors) or if I use the search field to filter the output log, it does not.

Thanks,

Elathan

I was not able to reproduce this by :

  1. Opening the Output Log
  2. Scrolling to the bottom of already existing text
  3. Packaging for Windows 64…

RESULT: Scrollbar stays anchored to the bottom of the screen while new data is generated. Searching in the search field removes unnecessary text temporarily but clearing the field results in the scrollbar back anchored to the bottom.

If you find this not to be the case, please clearly list your repro steps so we can test this on our end.

Thanks,

.

“but clearing the field results in the scrollbar back anchored to the bottom.”

My problem is that it should be anchored to the bottom even if there is a search keyword specified.

My use case: I have my own log categories. Sometimes I want to see only messages from one category. I type the log category name to the search field, so only the messages from that category are displayed (because each log message begins with the category name). As long as the keyword is there the scrollbar is not anchored to the bottom.

I have entered the following feature request to add this functionality to UE4: UE-37021

UE-37021 this feature has been added and expected to be released with UE 4.15.

After reading this and doing some testing with the output log, I have found that selecting or deselecting any filter or category that isn’t the default settings will result in the output log not snapping to the bottom. As of version 4.17.2, if you want to keep the output log snapping, you will have to ensure the default values are selected as follows:
Filters:
All filters selected
Categories:
All categories selected

Hope this helps and hopefully can get fixed soon.

Hack Fix:

If you want to keep your filters active and have an auto-tail output log, add a single colon : to the text filter at the top. All debug lines will have a colon in them (they are all of the format, LogType: Message). At least this workaround allows you to keep your filters!

Actual Fix for Epic:

The proper fix for this bug is to append this to SOutputLog.h, bool IsFilterSet(). It currently reads:

/** Returns true if any messages should be filtered out */
bool IsFilterSet() { return !bShowErrors || !bShowLogs || !bShowWarnings || TextFilterExpressionEvaluator.GetFilterType() != ETextFilterExpressionType::Empty || !TextFilterExpressionEvaluator.GetFilterText().IsEmpty(); }

The fixed version should read:

/** Returns true if any messages should be filtered out */
bool IsFilterSet() { return !bShowErrors || !bShowLogs || !bShowWarnings || TextFilterExpressionEvaluator.GetFilterType() != ETextFilterExpressionType::Empty || !TextFilterExpressionEvaluator.GetFilterText().IsEmpty() || AvailableLogCategories.Num() != SelectedLogCategories.Num(); }

The final compare checks to see if any categories are deselected. This allows it to auto-scroll when only using category filters.

Additionally:

Also, if anyone at Epic can hear me? Here’s how to persist selected filters between app launches by storing them in the registry on Windows:

void SOutputLog::SerializeSelectedFilters()
{
	for (FName NextCat : Filter.GetAvailableLogCategories())
	{
		FWindowsPlatformMisc::SetStoredValue(TEXT("Epic Games"), TEXT("Unreal Engine/Log Filters"), NextCat.ToString(), Filter.IsLogCategoryEnabled(NextCat) ? TEXT("1") : TEXT("0"));
	}
}

void SOutputLog::DeserializeSelectedFilters()
{
	for (FName NextCat : Filter.GetAvailableLogCategories())
	{
		FString TextOut;
		if (FWindowsPlatformMisc::GetStoredValue(TEXT("Epic Games"), TEXT("Unreal Engine/Log Filters"), NextCat.ToString(), TextOut))
		{
			if (TextOut.Equals(TEXT("1")) && !Filter.IsLogCategoryEnabled(NextCat))
			{
				Filter.ToggleLogCategory(NextCat);
			}
			else if (TextOut.Equals(TEXT("0")) && Filter.IsLogCategoryEnabled(NextCat))
			{
				Filter.ToggleLogCategory(NextCat);
			}
		}
	}
	// Flag the messages count as dirty
	MessagesTextMarshaller->MarkMessagesCacheAsDirty();

	Refresh();
}

Call SerializeSelectedFilters in CategoriesShowAll_Execute() and in CategoresSingle_Execute(), call DeserialiseSelectedFilters from Construct().