๐ Runtime Logging Library
Short Description
Runtime logging helpers usable from both C++ and Blueprints. Use them to emit on-screen toasts, console entries, and controlled, suppressible log messages during gameplay and tools.
Long Description
UGorgeousLoggingBlueprintFunctionLibrary centralizes logging for Gorgeous Core runtime systems. It provides functions to emit messages at different importance levels, optional on-screen toasts, and a lightweight suppression system keyed by LoggingKey so callers can replace or silence repeated messages.
๐ Features
- Multi-level runtime logging (Info, Success, Warning, Error, Fatal).
- On-screen toasts and console logging toggles.
- Per-key suppression and management for noisy or repeated messages.
- Blueprint-callable helpers for easy use in gameplay graphs.
LogMessage
Central entry for flexible logging. Prefer LoggingKey for repeatable operations so messages can be updated or suppressed by key.
| Parameter Name | Type | Description |
|---|---|---|
Message |
FText |
Human readable message text. |
Importance |
EGorgeousLoggingImportance |
Severity/importance of the message. |
LoggingKey |
FString / FName |
Unique key to identify or replace a message instance. |
Duration |
float |
Display time for on-screen toasts. |
bPrintToScreen |
bool |
Whether to show on-screen toast. |
bPrintToLog |
bool |
Whether to print to the console/log. |
bOverrideLoggingIfPresent |
bool |
Replace existing message with same key when true. |
bShowAsToast |
bool |
Alias for on-screen toast behavior. |
// Basic info message
UGorgeousLoggingBlueprintFunctionLibrary::LogInformationMessage(
FText::FromString("Save complete"),
FString("SaveOp"),
3.0f, // duration
true, // print to screen
true, // print to log
GetWorld()
);
// Suppress a noisy key
UGorgeousLoggingBlueprintFunctionLibrary::SetLoggingKeySuppressed(FName("NoisyKey"), true);
- Use the
LogInformationMessage/LogWarningMessagenodes. - Pass a short
LoggingKeyto allow later suppression viaSetLoggingKeySuppressed.
SetLoggingKeySuppressed
Sets or clears suppression for a logging key. When suppressed, messages associated with that key can be silenced or replaced by subsequent calls that use the same key.
| Parameter Name | Type | Description |
|---|---|---|
LoggingKey |
FName |
The key to suppress or unsuppress. |
bShouldSuppress |
bool |
True to suppress the key, false to unsuppress. |
UGorgeousLoggingBlueprintFunctionLibrary::SetLoggingKeySuppressed(FName("NoisyKey"), true);
IsLoggingKeySuppressed
Returns whether a given logging key is currently suppressed.
| Parameter Name | Type | Description |
|---|---|---|
LoggingKey |
FName |
The key to query. |
bool bSuppressed = UGorgeousLoggingBlueprintFunctionLibrary::IsLoggingKeySuppressed(FName("NoisyKey"));
ClearAllLoggingSuppressions
Clears all runtime logging suppressions, re-enabling messages that were previously suppressed.
This function takes no parameters.
UGorgeousLoggingBlueprintFunctionLibrary::ClearAllLoggingSuppressions();
โ ๏ธ Notes & best practices
- Use
LoggingKeyfor repeatable or long-running operations so messages can be updated or suppressed reliably. - Keep message text concise and include contextual payload identifiers when helpful (IDs, asset names).
- Macros in the Runtime Utilities may wrap these functions for concise usage; see the
Macro Usagesection below.
Macro Usage
The runtime exposes logging macros for concise patterns. These macros may reference hyperlink helpers in editor contexts; hyperlinks are editor-only. For macro details consult the helper macros docs.