Subsystem class for logging messages in the console and on the screen.
More...
#include <LoggerSubsystem.h>
|
virtual void | Log (const UObject *InContextObject, FString InMessage=TEXT("Log Message"), int32 InKey=1, float InTime=5.0f, bool bConsoleLog=false) |
| Logs a message to the screen and optionally to the console.
|
|
virtual void | Warning (const UObject *InContextObject, FString InMessage=TEXT("Warning Message"), int32 InKey=2, float InTime=5.0f, bool bConsoleLog=false) |
| Logs a warning message to the screen and optionally to the console.
|
|
virtual void | Error (const UObject *InContextObject, FString InMessage=TEXT("Error Message"), int32 InKey=3, float InTime=5.0f, bool bConsoleLog=false) |
| Logs an error message to the screen and optionally to the console.
|
|
virtual void | ScreenMessage (const UObject *InContextObject, FString InMessage=FString(TEXT("Screen message")), int32 InKey=1, FLinearColor InColor=FLinearColor(255, 255, 255, 255), float InTime=5.0f) |
| Displays a message on the screen with a specified color and duration.
|
|
virtual void | ConsoleLog (const UObject *InContextObject, FString InMessage=FString(TEXT("Console message")), EConsoleColor InColor=EConsoleColor::COLOR_NONE) |
| Logs a message to the console with a specified color.
|
|
Subsystem class for logging messages in the console and on the screen.
This class provides methods to log messages at various levels (Log, Warning, Error) both on the screen and in the console with specific colors.
◆ ConsoleLog()
virtual void ULoggerSubsystem::ConsoleLog |
( |
const UObject * | InContextObject, |
|
|
FString | InMessage = FString(TEXT("Console message")), |
|
|
EConsoleColor | InColor = EConsoleColor::COLOR_NONE ) |
|
virtual |
Logs a message to the console with a specified color.
- Parameters
-
InContextObject | The context object, typically the calling UObject. |
InMessage | The message to log to the console. Defaults to "Console message". |
InColor | The color of the console message. Defaults to EConsoleColor::COLOR_NONE. |
◆ Error()
virtual void ULoggerSubsystem::Error |
( |
const UObject * | InContextObject, |
|
|
FString | InMessage = TEXT("Error Message"), |
|
|
int32 | InKey = 3, |
|
|
float | InTime = 5.0f, |
|
|
bool | bConsoleLog = false ) |
|
virtual |
Logs an error message to the screen and optionally to the console.
- Parameters
-
InContextObject | The context object, typically the calling UObject. |
InMessage | The error message to log. Defaults to "Error Message". |
InKey | The key for the on-screen message. Defaults to 3. |
InTime | The duration the message stays on the screen. Defaults to 5.0f seconds. |
bConsoleLog | If true, logs the error message to the console as well. Defaults to false. |
◆ GetSettings()
virtual const class ULoggerSettings * ULoggerSubsystem::GetSettings |
( |
| ) |
const |
|
protectedvirtual |
◆ Log()
virtual void ULoggerSubsystem::Log |
( |
const UObject * | InContextObject, |
|
|
FString | InMessage = TEXT("Log Message"), |
|
|
int32 | InKey = 1, |
|
|
float | InTime = 5.0f, |
|
|
bool | bConsoleLog = false ) |
|
virtual |
Logs a message to the screen and optionally to the console.
- Parameters
-
InContextObject | The context object, typically the calling UObject. |
InMessage | The message to log. Defaults to "Log Message". |
InKey | The key for the on-screen message. Defaults to 1. |
InTime | The duration the message stays on the screen. Defaults to 5.0f seconds. |
bConsoleLog | If true, logs the message to the console as well. Defaults to false. |
◆ ScreenMessage()
virtual void ULoggerSubsystem::ScreenMessage |
( |
const UObject * | InContextObject, |
|
|
FString | InMessage = FString(TEXT("Screen message")), |
|
|
int32 | InKey = 1, |
|
|
FLinearColor | InColor = FLinearColor(255, 255, 255, 255), |
|
|
float | InTime = 5.0f ) |
|
virtual |
Displays a message on the screen with a specified color and duration.
- Parameters
-
InContextObject | The context object, typically the calling UObject. |
InMessage | The message to display. Defaults to "Screen message". |
InKey | The key for the on-screen message. Defaults to 1. |
InColor | The color of the on-screen message. Defaults to white (FColor(255, 255, 255, 255)). |
InTime | The duration the message stays on the screen. Defaults to 5.0f seconds. |
◆ SetConsoleColor()
virtual void ULoggerSubsystem::SetConsoleColor |
( |
EConsoleColor | InColor = EConsoleColor::COLOR_NONE | ) |
|
|
protectedvirtual |
Sets the console text color.
- Parameters
-
InColor | The color to set the console text to. Defaults to EConsoleColor::COLOR_NONE. |
◆ Warning()
virtual void ULoggerSubsystem::Warning |
( |
const UObject * | InContextObject, |
|
|
FString | InMessage = TEXT("Warning Message"), |
|
|
int32 | InKey = 2, |
|
|
float | InTime = 5.0f, |
|
|
bool | bConsoleLog = false ) |
|
virtual |
Logs a warning message to the screen and optionally to the console.
- Parameters
-
InContextObject | The context object, typically the calling UObject. |
InMessage | The warning message to log. Defaults to "Warning Message". |
InKey | The key for the on-screen message. Defaults to 2. |
InTime | The duration the message stays on the screen. Defaults to 5.0f seconds. |
bConsoleLog | If true, logs the warning message to the console as well. Defaults to false. |
The documentation for this class was generated from the following file: