bEnableOutputLogClearOnPIE

bEnableOutputLogClearOnPIE

#Overview

name: bEnableOutputLogClearOnPIE

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bEnableOutputLogClearOnPIE is to control whether the Output Log in Unreal Engine should be automatically cleared when entering Play-In-Editor (PIE) mode. This setting is part of the editor’s debugging and development tools, specifically related to the Output Log functionality.

This setting variable is primarily used by the Output Log module, which is part of Unreal Engine’s development and debugging tools. It’s referenced in the OutputLogModule and SOutputLog classes, which are responsible for managing the Output Log window in the Unreal Editor.

The value of this variable is set in the project’s configuration file (GEditorPerProjectIni). It can be modified programmatically through the UOutputLogSettings class, which saves the setting to the config file when changed.

This variable interacts with other functions in the Output Log module, such as ClearOnPIE and IsClearOnPIEEnabled. These functions use the value of bEnableOutputLogClearOnPIE to determine whether to clear the log when entering PIE mode.

Developers should be aware that this setting is only available in editor builds (WITH_EDITORONLY_DATA). It’s a user preference that affects the behavior of the Output Log during development and debugging sessions.

Best practices when using this variable include:

  1. Consider enabling it to keep the Output Log clean and focused on the current play session.
  2. Be aware that important information from previous sessions might be lost if this setting is enabled.
  3. Use it in conjunction with other logging practices, such as saving important log information to separate files if needed.
  4. Remember that this setting is per-project, so it should be configured appropriately for each project’s specific needs.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:23, section: [/Script/UnrealEd.EditorPerProjectUserSettings]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Developer/OutputLog/Private/OutputLogModule.cpp:330

Scope (from outer to inner):

file
function     void FOutputLogModule::ClearOnPIE

Source code excerpt:

{
	bool bClearOnPIEEnabled = false;
	GConfig->GetBool(TEXT("/Script/OutputLog.OutputLogSettings"), TEXT("bEnableOutputLogClearOnPIE"), bClearOnPIEEnabled, GEditorPerProjectIni);

	if (bClearOnPIEEnabled)
	{
		if (TSharedPtr<SOutputLog> OutputLogPinned = OutputLog.Pin())
		{
			if (OutputLogPinned->CanClearLog())

#Loc: <Workspace>/Engine/Source/Developer/OutputLog/Private/SOutputLog.cpp:1600

Scope (from outer to inner):

file
function     bool SOutputLog::IsClearOnPIEEnabled

Source code excerpt:

{
	const UOutputLogSettings* Settings = GetDefault<UOutputLogSettings>();
	return Settings ? Settings->bEnableOutputLogClearOnPIE : false;
}

void SOutputLog::SetClearOnPIE(ECheckBoxState InValue)
{
	const bool bClearOnPIEEnabled = (InValue == ECheckBoxState::Checked);
	UOutputLogSettings* Settings = GetMutableDefault<UOutputLogSettings>();
	if (Settings)
	{
		Settings->bEnableOutputLogClearOnPIE = bClearOnPIEEnabled;
		Settings->SaveConfig();
	}
}
#endif

void SOutputLog::BuildInitialLogCategoryFilter(const FArguments& InArgs)

#Loc: <Workspace>/Engine/Source/Developer/OutputLog/Public/OutputLogSettings.h:65

Scope (from outer to inner):

file
class        class UOutputLogSettings : public UObject

Source code excerpt:

#if WITH_EDITORONLY_DATA
	UPROPERTY(config)
	bool bEnableOutputLogClearOnPIE;
#endif

public:

	/**
	 * Returns an event delegate that is executed when a setting has changed.