Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
OutputDeviceHelper.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "Containers/StringFwd.h"
7#include "Logging/LogVerbosity.h"
8#include "Misc/OutputDevice.h"
9
10#if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_1
11#include "Containers/UnrealString.h"
12#endif
13
14class FArchive;
15class FName;
16class FString;
17
18/** Helper functions used by FOutputDevice derived classes **/
20{
21 /** Append a formatted log line to the string builder. */
22 static void AppendFormatLogLine(FWideStringBuilderBase& Output, ELogVerbosity::Type Verbosity, const FName& Category, const TCHAR* Message = nullptr, ELogTimes::Type LogTime = ELogTimes::None, double Time = -1.0, int32* OutCategoryIndex = nullptr);
23 static void AppendFormatLogLine(FUtf8StringBuilderBase& Output, ELogVerbosity::Type Verbosity, const FName& Category, const TCHAR* Message = nullptr, ELogTimes::Type LogTime = ELogTimes::None, double Time = -1.0, int32* OutCategoryIndex = nullptr);
24
25 /**
26 * Formats a log line with date, time, category and verbosity prefix
27 * @param Verbosity Message verbosity
28 * @param Category Message category
29 * @param Message Optional message text. If nullptr, only the date/time/category/verbosity prefix will be returned
30 * @param LogTime Time format
31 * @param Time Time in seconds
32 * @param OutCategoryIndex (if non-null) The index of the category within the return string is written here, or INDEX_NONE if the category is suppressed
33 * @returns Formatted log line
34 */
35 static FString FormatLogLine(ELogVerbosity::Type Verbosity, const FName& Category, const TCHAR* Message = nullptr, ELogTimes::Type LogTime = ELogTimes::None, double Time = -1.0, int32* OutCategoryIndex = nullptr);
36
37 /**
38 * Formats, casts to ANSI char and serializes a message to archive. Optimized for small number of allocations and Serialize calls
39 * @param Output Output archive
40 * @param Message Log message
41 * @param Verbosity Message verbosity
42 * @param Category Message category
43 * @param Time Message time
44 * @param bSuppressEventTag True if the message date/time prefix should be suppressed
45 * @param bAutoEmitLineTerminator True if the message should be automatically appended with a line terminator
46 **/
47 static void FormatCastAndSerializeLine(FArchive& Output, const TCHAR* Message, ELogVerbosity::Type Verbosity, const FName& Category, double Time, bool bSuppressEventTag, bool bAutoEmitLineTerminator);
48};
static void AppendFormatLogLine(FUtf8StringBuilderBase &Output, ELogVerbosity::Type Verbosity, const FName &Category, const TCHAR *Message=nullptr, ELogTimes::Type LogTime=ELogTimes::None, double Time=-1.0, int32 *OutCategoryIndex=nullptr)
static void FormatCastAndSerializeLine(FArchive &Output, const TCHAR *Message, ELogVerbosity::Type Verbosity, const FName &Category, double Time, bool bSuppressEventTag, bool bAutoEmitLineTerminator)
static FString FormatLogLine(ELogVerbosity::Type Verbosity, const FName &Category, const TCHAR *Message=nullptr, ELogTimes::Type LogTime=ELogTimes::None, double Time=-1.0, int32 *OutCategoryIndex=nullptr)
static void AppendFormatLogLine(FWideStringBuilderBase &Output, ELogVerbosity::Type Verbosity, const FName &Category, const TCHAR *Message=nullptr, ELogTimes::Type LogTime=ELogTimes::None, double Time=-1.0, int32 *OutCategoryIndex=nullptr)