![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "Containers/UnrealString.h"#include "CoreTypes.h"#include "HAL/PreprocessorHelpers.h"#include "Logging/LogCategory.h"#include "Logging/LogScopedCategoryAndVerbosityOverride.h"#include "Logging/LogTrace.h"#include "Logging/LogVerbosity.h"#include "Misc/AssertionMacros.h"#include "Misc/Build.h"#include "Misc/VarArgs.h"#include "String/FormatStringSan.h"#include "Templates/EnableIf.h"#include "Templates/IsArrayOrRefOfTypeByPredicate.h"#include "Templates/IsValidVariadicFunctionArg.h"#include "Traits/IsCharEncodingCompatibleWith.h"#include <type_traits>Go to the source code of this file.
Classes | |
| struct | FMsg |
Namespaces | |
| namespace | UE |
| namespace | UE::Logging |
| namespace | UE::Logging::Private |
| namespace | UEAsserts_Private |
Functions | |
| template<int32 VerbosityToCheck, typename CategoryType > | |
| UE_FORCEINLINE_HINT bool | UEAsserts_Private::IsLogActive (const CategoryType &Category) |
Variables | |
| CORE_API int32 | GEnsureOnNANDiagnostic |
| #define COMPILED_IN_MINIMUM_VERBOSITY VeryVerbose |
| #define DECLARE_LOG_CATEGORY_CLASS | ( | CategoryName, | |
| DefaultVerbosity, | |||
| CompileTimeVerbosity | |||
| ) | DEFINE_LOG_CATEGORY_STATIC(CategoryName, DefaultVerbosity, CompileTimeVerbosity) |
A macro to declare a logging category as a C++ "class static"
| CategoryName,category | to declare |
| DefaultVerbosity,default | run time verbosity |
| CompileTimeVerbosity,maximum | verbosity to compile into the code |
| #define DECLARE_LOG_CATEGORY_EXTERN | ( | CategoryName, | |
| DefaultVerbosity, | |||
| CompileTimeVerbosity | |||
| ) |
A macro to declare a logging category as a C++ "extern", usually declared in the header and paired with DEFINE_LOG_CATEGORY in the source. Accessible by all files that include the header.
| CategoryName,category | to declare |
| DefaultVerbosity,default | run time verbosity |
| CompileTimeVerbosity,maximum | verbosity to compile into the code |
| #define DEFINE_LOG_CATEGORY | ( | CategoryName | ) | FLogCategory##CategoryName CategoryName; |
A macro to define a logging category, usually paired with DECLARE_LOG_CATEGORY_EXTERN from the header.
| CategoryName,category | to define |
| #define DEFINE_LOG_CATEGORY_CLASS | ( | Class, | |
| CategoryName | |||
| ) | Class::FLogCategory##CategoryName Class::CategoryName; |
A macro to define a logging category, usually paired with DECLARE_LOG_CATEGORY_CLASS from the header.
| CategoryName,category | to define |
| #define DEFINE_LOG_CATEGORY_STATIC | ( | CategoryName, | |
| DefaultVerbosity, | |||
| CompileTimeVerbosity | |||
| ) |
A macro to define a logging category as a C++ "static". This should ONLY be declared in a source file. Only accessible in that single file.
| CategoryName,category | to declare |
| DefaultVerbosity,default | run time verbosity |
| CompileTimeVerbosity,maximum | verbosity to compile into the code |
| #define logOrEnsureNanError | ( | _FormatString_, | |
| ... | |||
| ) |
| #define NOTIFY_CLIENT_OF_SECURITY_EVENT_IF_NOT_SHIPPING | ( | NetConnection, | |
| SecurityPrint | |||
| ) |
| #define UE_CLOG | ( | Condition, | |
| CategoryName, | |||
| Verbosity, | |||
| Format, | |||
| ... | |||
| ) | UE_PRIVATE_LOG(if (Condition), constexpr, CategoryName, Verbosity, Format, ##__VA_ARGS__) |
A macro that conditionally logs a formatted message if the log category is active at the requested verbosity level.
| Condition | Condition that must evaluate to true in order for the message to be logged. |
| CategoryName | Name of the log category as provided to DEFINE_LOG_CATEGORY. |
| Verbosity | Verbosity level of this message. See ELogVerbosity. |
| Format | Format string literal in the style of printf. |
| #define UE_GET_LOG_VERBOSITY | ( | CategoryName | ) | CategoryName.GetVerbosity() |
| #define UE_LOG | ( | CategoryName, | |
| Verbosity, | |||
| Format, | |||
| ... | |||
| ) | UE_PRIVATE_LOG(UE_EMPTY, constexpr, CategoryName, Verbosity, Format, ##__VA_ARGS__) |
A macro that logs a formatted message if the log category is active at the requested verbosity level.
| CategoryName | Name of the log category as provided to DEFINE_LOG_CATEGORY. |
| Verbosity | Verbosity level of this message. See ELogVerbosity. |
| Format | Format string literal in the style of printf. |
| #define UE_LOG_ACTIVE | ( | CategoryName, | |
| Verbosity | |||
| ) | (::UEAsserts_Private::IsLogActive<(int32)ELogVerbosity::Verbosity>(CategoryName)) |
A predicate that returns true if the given logging category is active (logging) at a given verbosity level
| CategoryName | name of the logging category |
| Verbosity,verbosity | level to test against |
| #define UE_LOG_EXPAND_IS_FATAL | ( | Verbosity, | |
| ActiveBlock, | |||
| InactiveBlock | |||
| ) | UE_JOIN(UE_LOG_EXPAND_IS_FATAL_, Verbosity)(ActiveBlock, InactiveBlock) |
| #define UE_LOG_EXPAND_IS_FATAL_All | ( | ActiveBlock, | |
| InactiveBlock | |||
| ) | InactiveBlock |
| #define UE_LOG_EXPAND_IS_FATAL_Display | ( | ActiveBlock, | |
| InactiveBlock | |||
| ) | InactiveBlock |
| #define UE_LOG_EXPAND_IS_FATAL_Error | ( | ActiveBlock, | |
| InactiveBlock | |||
| ) | InactiveBlock |
| #define UE_LOG_EXPAND_IS_FATAL_Fatal | ( | ActiveBlock, | |
| InactiveBlock | |||
| ) | ActiveBlock |
| #define UE_LOG_EXPAND_IS_FATAL_Log | ( | ActiveBlock, | |
| InactiveBlock | |||
| ) | InactiveBlock |
| #define UE_LOG_EXPAND_IS_FATAL_SetColor | ( | ActiveBlock, | |
| InactiveBlock | |||
| ) | InactiveBlock |
| #define UE_LOG_EXPAND_IS_FATAL_Verbose | ( | ActiveBlock, | |
| InactiveBlock | |||
| ) | InactiveBlock |
| #define UE_LOG_EXPAND_IS_FATAL_VeryVerbose | ( | ActiveBlock, | |
| InactiveBlock | |||
| ) | InactiveBlock |
| #define UE_LOG_EXPAND_IS_FATAL_Warning | ( | ActiveBlock, | |
| InactiveBlock | |||
| ) | InactiveBlock |
| #define UE_LOG_INCLUDE_SOURCE_LOCATION 1 |
| #define UE_LOG_REF | ( | CategoryRef, | |
| Verbosity, | |||
| Format, | |||
| ... | |||
| ) | UE_PRIVATE_LOG(UE_EMPTY, UE_EMPTY, CategoryRef, Verbosity, Format, ##__VA_ARGS__) |
DO NOT USE. A macro that logs a formatted message if the log category is active at the requested verbosity level.
| CategoryRef | A reference to an instance of FLogCategoryBase. |
| Verbosity | Verbosity level of this message. See ELogVerbosity. |
| Format | Format string literal in the style of printf. |
| #define UE_PRIVATE_LOG | ( | Condition, | |
| CategoryConst, | |||
| Category, | |||
| Verbosity, | |||
| Format, | |||
| ... | |||
| ) |
Private macro used to implement the public log macros. DO NOT CALL DIRECTLY!
| #define UE_PRIVATE_LOG_USE_STATIC_RECORD 1 |
| #define UE_SET_LOG_VERBOSITY | ( | CategoryName, | |
| Verbosity | |||
| ) | CategoryName.SetVerbosity(ELogVerbosity::Verbosity); |
| #define UE_SUPPRESS | ( | CategoryName, | |
| Verbosity, | |||
| ExecuteIfUnsuppressed | |||
| ) |
A macro that executes some code within a scope if a given logging category is active at a given verbosity level Also, withing the scope of the execution, the default category and verbosity is set up for the low level logging functions.
| CategoryName | name of the logging category |
| Verbosity,verbosity | level to test against |
| ExecuteIfUnsuppressed,code | to execute if the verbosity level for this category is being displayed |