97 EnableClientConsole(PC);
103 Self& OnlyEnableOnScreen(
bool bInForceEnableScreenMessages =
false)
105 EnableOnScreen(bInForceEnableScreenMessages);
106 DisableClientConsole();
111 Self& OnlyEnableOutputLog()
115 DisableClientConsole();
120 Self& OnlyEnableMessageLog(
bool bSuppressLoggingToOutputLog =
false)
122 EnableMessageLog(bSuppressLoggingToOutputLog);
124 DisableClientConsole();
136 UseClientConsole(
true);
137 SetClientConsolePlayerController(PC);
140 Self& DisableClientConsole() {
return UseClientConsole(
false); }
141 Self& UseClientConsole(
bool bValue)
143 bClientConsole = bValue;
153 Self& EnableOnScreen(
bool bInForceEnableScreenMessages =
false) {
return UseOnScreen(
true, bInForceEnableScreenMessages); }
154 Self& DisableOnScreen() {
return UseOnScreen(
false); }
155 Self& UseOnScreen(
bool bValue,
bool bInForceEnableScreenMessages =
false)
158 bForceEnableScreenMessages = bInForceEnableScreenMessages;
163 Self& SetOnScreenTimeToDisplay(
float Seconds)
165 ScreenLogDisplayTimeSeconds = Seconds;
170 Self& SetOnScreenNewerOnTop(
bool bValue)
172 bScreenNewerOnTop = bValue;
177 static void ClearAllOnScreenLogs();
178 FORCEINLINE
static bool AreAllOnScreenMessagesEnabled() {
return GAreScreenMessagesEnabled; }
179 FORCEINLINE
static void SetAreAllOnScreenMessagesEnabled(
bool bValue)
181 GAreScreenMessagesEnabled = bValue;
183 FORCEINLINE
static void DisableAllOnScreenMessages() { SetAreAllOnScreenMessagesEnabled(
false); }
184 FORCEINLINE
static void EnableAllOnScreenMessages() { SetAreAllOnScreenMessagesEnabled(
true); }
191 Self& EnableOutputLog() {
return UseOutputLog(
true); }
192 Self& DisableOutputLog() {
return UseOutputLog(
false); }
193 Self& UseOutputLog(
bool bValue)
200 Self& SetNoOutputLogCategory() {
return SetOutputLogCategory(NAME_None); }
201 Self& SetOutputLogCategory(
const FLogCategoryBase& NewCategory) {
return SetOutputLogCategory(NewCategory.GetCategoryName()); }
202 Self& SetOutputLogCategory(FName NewCategory)
204 PreviousOutputLogCategory = OutputLogCategory;
205 OutputLogCategory = NewCategory;
211 Self& SetOutputLogCategory(FNoLoggingCategory
NoLogging)
213 OutputLogCategory = NAME_None;
223 Self& EnableMessageLog(
bool bSuppressLoggingToOutputLog =
false) {
return UseMessageLog(
true, bSuppressLoggingToOutputLog); }
224 Self& DisableMessageLog() {
return UseMessageLog(
true); }
225 Self& UseMessageLog(
bool bValue,
bool bInMessageLogMirrorToOutputLog =
true)
227 bMessageLog = bValue;
228 return SetMessageLogMirrorToOutputLog(bInMessageLogMirrorToOutputLog);
233 Self& SetMessageLogOpenOnNewMessage(
bool bValue)
235 bMessageLogOpen = bValue;
240 Self& SetMessageLogMirrorToOutputLog(
bool bValue)
242 bMessageLogMirrorToOutputLog = bValue;
249 RedirectMessageLogLevelsHigherThan = AfterOrEqualLevel;
256 OpenMessageLogLevelsHigherThan = AfterOrEqualLevel;
260 static bool IsMessageLogNameRegistered(FName LogName);
261 static bool MessageLogUnregisterLogName(FName LogName);
263#if WITH_UNREAL_DEVELOPER_TOOLS
264 static TSharedPtr<IMessageLogListing> MessageLogGetLogNameListing(FName LogName);
266 static void MessageLogOpenLogName(FName LogName);
271 Self& SetMessageLogName(FName LogName,
bool bVerify =
true)
273#if WITH_UNREAL_DEVELOPER_TOOLS
274 if (bVerify && !IsMessageLogNameRegistered(LogName))
276 Warning(TEXT(
"SetMessageLogName: Failed to register the message log name"));
280 MessageLogName = LogName;
288 FORCEINLINE FName GetOutputLogCategory()
const {
return OutputLogCategory; }
289 FORCEINLINE
bool IsClientConsoleEnabled()
const {
return bClientConsole; }
290 FORCEINLINE
bool IsOnScreenEnabled()
const {
return bOnScreen; }
291 FORCEINLINE
bool IsOutputLogEnabled()
const {
return bOutputLog; }
292 FORCEINLINE
bool IsMessageLogEnabled()
const {
return bMessageLog; }
294 template <
typename FmtType,
typename... Types>
297 static_assert(TIsArrayOrRefOfType<FmtType, TCHAR>::Value,
"Formatting string must be a TCHAR array.");
298 static_assert(TAnd<TIsValidVariadicFunctionArg<Types>...>::Value,
"Invalid argument(s) passed to INYLogger::Logf");
299 LogfImplementation(Level, Fmt, Args...);
302 template <
typename FmtType,
typename... Types>
305 template <
typename FmtType,
typename... Types>
308 template <
typename FmtType,
typename... Types>
311 template <
typename FmtType,
typename... Types>
314 template <
typename FmtType,
typename... Types>
332#if WITH_UNREAL_DEVELOPER_TOOLS
333 static FMessageLogModule* GetMessageLogModule();
349 return ELogVerbosity::Error;
352 return ELogVerbosity::Warning;
355 return ELogVerbosity::Verbose;
358 return ELogVerbosity::VeryVerbose;
361 return ELogVerbosity::Log;
364 static EMessageSeverity::Type GetMessageSeverityForLogLevel(
ENYLoggerLogLevel Level)
372 return EMessageSeverity::Error;
375 return EMessageSeverity::Warning;
378 return EMessageSeverity::Info;
413 bool bOnScreen =
false;
416 float ScreenLogDisplayTimeSeconds = 5.f;
419 FVector2D ScreenTextScale = FVector2D::UnitVector;
422 bool bScreenNewerOnTop =
true;
425 bool bForceEnableScreenMessages =
false;
432 bool bOutputLog =
false;
435 FName OutputLogCategory = NAME_None;
438 FName PreviousOutputLogCategory = NAME_None;
445 bool bMessageLog =
true;
448 FName MessageLogName = TEXT(
"PIE");
451 bool bMessageLogMirrorToOutputLog =
true;
462 bool bMessageLogOpen =
true;
473 bool bClientConsole =
false;
482 FColor ColorFatal = FColor::Red;
483 FColor ColorError = FColor::Red;
484 FColor ColorWarning = FColor::Yellow;
485 FColor ColorInfo = FColor::White;
486 FColor ColorDebug = FColor::Blue;
487 FColor ColorTrace = FColor::Cyan;