Below code at present will show UE_LOG's up to Verbose, however if declared "LogMyGame" category in "Architecture.h" header is changed to "Warning" (changing either DefaultVerbosity or CompileTimeVerbosity parameter) you are supposed to see logs up to warnings but not Verbose logs.
starting PIE will print Verbose log even though you change log level. and will likely result in crash.
However if UE Editor and VS are closed, it will work just fine. so the problem is that changing log level verbosity and recompiling will not be updated and reflected when starting PIE.
Test project name: "Architecture"
Primary game module:
Architecture.h
Architecture.cpp
Sample function somewhere in the project that calls UE_LOG, showing only those, depending on verbosity level specified in primary game module.
If you for example change in Architecture.h from this
to this:
recompile and start PIE the change will not be reflected, log will show Verbose logs even though you set "Error" verbosity and will usually but not always result in crash.
Do I do something wrong or is this a bug?
starting PIE will print Verbose log even though you change log level. and will likely result in crash.
However if UE Editor and VS are closed, it will work just fine. so the problem is that changing log level verbosity and recompiling will not be updated and reflected when starting PIE.
Test project name: "Architecture"
Primary game module:
Architecture.h
Code:
#pragma once #include "CoreMinimal.h" //General Log DECLARE_LOG_CATEGORY_EXTERN(LogMyGame, Verbose, All);
Code:
#include "Architecture.h" #include "Modules/ModuleManager.h" IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, Architecture, "Architecture" ); //General Log DEFINE_LOG_CATEGORY(LogMyGame);
Code:
#include "LoggingPawn.h" #include "Architecture.h" void ALoggingPawn::ShowLog() { //UE_LOG(LogMyGame, Fatal, TEXT("Fatal LogMyGame")); UE_LOG(LogMyGame, Error, TEXT("Error LogMyGame")); UE_LOG(LogMyGame, Warning, TEXT("Warning LogMyGame")); UE_LOG(LogMyGame, Log, TEXT("Log LogMyGame")); UE_LOG(LogMyGame, Verbose, TEXT("Verbose LogMyGame")); }
Code:
DECLARE_LOG_CATEGORY_EXTERN(LogMyGame, Verbose, All);
Code:
DECLARE_LOG_CATEGORY_EXTERN(LogMyGame, Error, All);
Do I do something wrong or is this a bug?
Comment