CookerIdleWarningSeverity
CookerIdleWarningSeverity
#Overview
name: CookerIdleWarningSeverity
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 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of CookerIdleWarningSeverity is to control the severity level of warning messages related to the cooker’s idle state in Unreal Engine 5’s cooking process. This setting variable is used to manage logging and debugging information during the cook-on-the-fly process.
The CookerIdleWarningSeverity variable is primarily used in the UnrealEd module, specifically within the CookOnTheFlyServer class. This class is responsible for managing the cook-on-the-fly process, which is crucial for preparing game content for distribution.
The value of this variable is set in the SetInitializeConfigSettings function of the UCookOnTheFlyServer class. It reads the severity level from the GEditorIni configuration file under the “CookSettings” section with the key “CookerIdleWarningSeverity”.
This variable interacts with the ELogVerbosity::Type enumeration, which defines different levels of log message severity in Unreal Engine. It is used to determine the severity of log messages when the cooker is idle or blocked.
Developers must be aware that this variable affects the visibility and prominence of warning messages during the cooking process. Setting it to a lower severity might cause important warnings to be missed, while setting it too high could lead to an overwhelming amount of debug information.
Best practices when using this variable include:
- Adjusting the severity level based on the development phase (e.g., higher severity during active development, lower for stable builds).
- Ensuring that the chosen severity level aligns with the team’s debugging and monitoring practices.
- Regularly reviewing logs to ensure that important warnings are not being overlooked due to the chosen severity level.
- Considering the impact on performance when setting higher verbosity levels, as excessive logging can affect cooking speed.
- Documenting any changes to this setting to maintain consistency across the development team.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditor.ini:345, section: [CookSettings]
- INI Section:
CookSettings
- Raw value:
Warning
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/CookOnTheSide/CookOnTheFlyServer.h:1465
Scope (from outer to inner):
file
class class UCookOnTheFlyServer : public UObject, public FTickableEditorObject, public FExec, public UE::Cook::ICookInfo
Source code excerpt:
TSet<FName> CookFilterIncludedAssetClasses;
ELogVerbosity::Type CookerIdleWarningSeverity = ELogVerbosity::Warning;
/** True when PumpLoads has detected it is blocked on async work and CookOnTheFlyServer should do work elsewhere. */
bool bLoadBusy = false;
/** True when PumpSaves has detected it is blocked on async work and CookOnTheFlyServer should do work elsewhere. */
bool bSaveBusy = false;
/** We need to track whether the compiler has been inactive for a long time before issuing a warning about it. */
bool bShaderCompilerWasActiveeOnPreviousBusyReport = true;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/CookOnTheFlyServer.cpp:1640
Scope (from outer to inner):
file
function void UCookOnTheFlyServer::SetSaveBusy
Source code excerpt:
if (ExpectedObjects.IsEmpty() || !NonExpectedObjects.IsEmpty())
{
MessageSeverity = CookerIdleWarningSeverity;
}
#if !NO_LOGGING
FMsg::Logf(__FILE__, __LINE__, LogCook.GetCategoryName(), MessageSeverity, TEXT("%s"), *Message);
#endif
UE_LOG(LogCook, Display, TEXT("%d packages in the savequeue: "), SaveQueue.Num());
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/CookOnTheFlyServer.cpp:1724
Scope (from outer to inner):
file
function void UCookOnTheFlyServer::SetLoadBusy
Source code excerpt:
FLoadPrepareQueue& LoadPrepareQueue = PackageDatas->GetLoadPrepareQueue();
#if !NO_LOGGING
FMsg::Logf(__FILE__, __LINE__, LogCook.GetCategoryName(), CookerIdleWarningSeverity,
TEXT("Cooker has been blocked from loading the current packages for %.0f seconds. %d packages in the loadqueue:"),
(float)(CurrentTime - LoadBusyStartTimeSeconds), LoadPrepareQueue.PreloadingQueue.Num() + LoadPrepareQueue.EntryQueue.Num());
#endif
for (FPackageData* PackageData : LoadPrepareQueue.PreloadingQueue)
{
if (DisplayCount == DisplayMax)
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/CookOnTheFlyServer.cpp:7125
Scope (from outer to inner):
file
function void UCookOnTheFlyServer::SetInitializeConfigSettings
Source code excerpt:
FString Severity;
GConfig->GetString(TEXT("CookSettings"), TEXT("CookerIdleWarningSeverity"), Severity, GEditorIni);
CookerIdleWarningSeverity = ParseLogVerbosityFromString(Severity);
bCookFastStartup = FParse::Param(FCommandLine::Get(), TEXT("cookfaststartup"));
}
void UCookOnTheFlyServer::ParseCookFilters()
{