LOG
LOG
#Overview
name: LOG
This variable is created as a Console Variable (cvar).
- type:
Exec
- help:
Sorry: Exec commands have no help
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of LOG is to provide a logging mechanism for the Unreal Engine, allowing developers to output debug information, warnings, and errors during runtime and development.
This setting variable is used across multiple Unreal Engine subsystems and plugins, including:
- The NNERuntimeRDG plugin, which appears to be related to neural network execution.
- The ResonanceAudio plugin, which deals with audio processing.
- The Core runtime module, specifically in the logging system.
The value of this variable is not directly set in the provided code snippets. Instead, LOG is used as a macro or function call to output information at various severity levels.
Other variables that interact with LOG include:
- severity: Used to determine the log level (e.g., WARNING, ERROR)
- Various condition variables used to determine when to log information
Developers must be aware of the following when using this variable:
- LOG is a macro that can be used across different parts of the engine and plugins.
- It’s important to use the appropriate severity level when logging information.
- Excessive logging can impact performance, especially in release builds.
Best practices when using this variable include:
- Use appropriate log levels (e.g., LOG(WARNING) for warnings, LOG(ERROR) for errors).
- Be concise and clear in log messages to aid in debugging.
- Consider using conditional logging to reduce performance impact in release builds.
- Ensure that sensitive information is not logged, especially in release builds.
- Use LOG consistently across the codebase to maintain a standardized logging approach.
- Combine LOG with other debugging tools and techniques for comprehensive issue tracking and resolution.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Experimental/NNERuntimeRDG/Source/NNERuntimeRDG/Private/Dml/NNEDmlOperatorElementwise.cpp:334
Scope (from outer to inner):
file
namespace UE::NNERuntimeRDG::Private::Dml
Source code excerpt:
REGISTER_OP_ELEMENT_WISE_UNARY( IsNan, IS_NAN, 13 )
REGISTER_OP_ELEMENT_WISE_UNARY( IsNan, IS_NAN, 20 )
REGISTER_OP_ELEMENT_WISE_UNARY_COMMON_VERSIONS( Log, LOG )
REGISTER_OP_ELEMENT_WISE_UNARY_COMMON_VERSIONS( Neg, NEGATE )
REGISTER_OP_ELEMENT_WISE_UNARY_COMMON_VERSIONS( Reciprocal, RECIP )
REGISTER_OP_ELEMENT_WISE_UNARY( Round, ROUND, 11 )
REGISTER_OP_ELEMENT_WISE_UNARY( Sign, SIGN, 9 )
REGISTER_OP_ELEMENT_WISE_UNARY( Sign, SIGN, 13 )
REGISTER_OP_ELEMENT_WISE_UNARY( Sin, SIN, 7 )
#Loc: <Workspace>/Engine/Plugins/Runtime/ResonanceAudio/Source/ResonanceAudio/Private/ResonanceAudioLibrary/resonance_audio/ambisonics/ambisonic_codec_impl.h:226
Scope (from outer to inner):
file
namespace vraudio
function const Eigen::Ref<const Eigen::MatrixXf> AmbisonicCodecImpl<NumAngles, NumSphericalHarmonics>::GetDecoderMatrix
Source code excerpt:
if (condition_number >
1.0f / (std::max(num_rows, num_cols) * kEpsilonFloat)) {
LOG(WARNING) << "Ambisonic decoding matrix is ill-conditioned. Results "
<< "may be inaccurate.";
}
decoder_matrix_invalid_ = false;
}
return decoder_matrix_;
}
#Loc: <Workspace>/Engine/Plugins/Runtime/ResonanceAudio/Source/ResonanceAudio/Private/ResonanceAudioLibrary/resonance_audio/base/logging.h:119
Scope: file
Source code excerpt:
#define CHECK_NOTNULL(val) CheckNotNull(val)
#define LOG(severity) NullLogger().GetStream()
#endif // RESONANCE_AUDIO_PLATFORM_LOGGING_H_
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Logging/LogSuppressionInterface.cpp:584
Scope (from outer to inner):
file
class class FLogSuppressionImplementation: public FLogSuppressionInterface, private FSelfRegisteringExec
function virtual bool Exec_Runtime
Source code excerpt:
virtual bool Exec_Runtime( UWorld* Inworld, const TCHAR* Cmd, FOutputDevice& Ar )
{
if(FParse::Command(&Cmd,TEXT("LOG")))
{
if(FParse::Command(&Cmd,TEXT("LIST"))) // if they didn't use the list command, we will show usage
{
TArray<FLogCategoryPtrs> Found;
FString Cat(FParse::Token(Cmd, 0));