Navigation
API > API/Runtime > API/Runtime/Core
Description
Serializes the value to be used in a log message.
Overload this when the log behavior needs to differ from general serialization to compact binary.
There are three ways to perform custom formatting for values that are serialized as an object:
Add a $text field that is a string with the exact text to display.
Add a $format field that is a format string that may reference fields of the object and their sub-objects.
Add a $locformat field that is a localized format string that may reference fields of the object and their sub-objects. The namespace and key must be included in $locns and $lockey string fields. Serialize FText to the writer using SerializeLogFormat().
Arrays and objects without custom formatting are converted to JSON.
| Name | UE::SerializeForLog |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Logging/StructuredLog.h |
| Include Path | #include "Logging/StructuredLog.h" |
namespace UE
{
template<typename ValueType, std::enable_if_t<< FCbWriter & >, ValueType >), int >>
void UE::SerializeForLog
(
FCbWriter & Writer,
ValueType && Value
)
}