๐งญ Logging Helper
Short Description
Centralized logging utilities and editor toast helpers used across Gorgeous runtime utilities.
Long Description
GorgeousLogging provides message formatting, toast notifications (editor only), suppression keys and a single LogMessage_Internal entrypoint used by the logging macros. The helper exposes small convenience wrappers to show queued editor notifications safely and to snapshot logging settings from config.
๐ Features
- Editor toast notification helpers (
FGorgeousToastParams,ShowToastNotification). - Convert common types to
FTextfor consistent logging output. - Key-based suppression of repeated log messages.
- Snapshot of logging settings loaded from config.
- Central internal logger used by the macros (see Macros/LoggingHelper.md).
FGorgeousToastParams + ShowToastNotification
FGorgeousToastParams is a simple POD with title, message, icon kind and timing options used to show editor notifications. ShowToastNotification queues notifications until the editor is ready and then displays them.
| Parameter Name | Type | Description |
|---|---|---|
Params |
FGorgeousToastParams |
Full customization struct. |
FGorgeousToastParams P;
P.Title = TEXT("Validation");
P.Message = TEXT("Plugin validated successfully.");
P.ToastIconKind = 2; // success
GorgeousLogging::ShowToastNotification(P);
GorgeousLogging::SetLoggingKeySuppressed / IsLoggingKeySuppressed / ClearAllLoggingSuppressions
Use these helpers to temporarily silence log messages that share a logical key. Suppression is held in memory for the running process and affects LogMessage_Internal routing.
| Parameter Name | Type | Description |
|---|---|---|
LoggingKey |
FName |
Unique key used by message authors. |
bShouldSuppress |
bool |
true to suppress, false to allow. |
GorgeousLogging::SetLoggingKeySuppressed(TEXT("MyKey"), true);
if (GorgeousLogging::IsLoggingKeySuppressed(TEXT("MyKey"))) { /* ... */ }
GorgeousLogging::ClearAllLoggingSuppressions();
GetLoggingSettingsSnapshot + LogMessage_Internal
GetLoggingSettingsSnapshot reads developer settings to decide message routing. LogMessage_Internal is the central implementation called by the macros. It handles suppression keys, gameplay-tag based deduplication, printing to message log vs output log, on-screen debug messages and optional toasts.
GorgeousLogging::LogMessage_Internal(
FText::FromString(TEXT("Something happened")),
Logging_Information,
TEXT("MyKey"),
5.f, true, true, true, false, nullptr, nullptr
);
Where to find the header
src/content/gorgeous-core/RuntimeUtilities/Helpers/Headers/GorgeousLoggingHelper.h