From 831935abb2b79fe79021e89a5344cad59cff00b5 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Thu, 11 Dec 2025 13:52:40 +0100 Subject: [PATCH 1/2] Fixed headers --- platform-includes/logs/options/unreal.mdx | 2 -- platform-includes/logs/setup/unreal.mdx | 6 ++++-- platform-includes/logs/usage/unreal.mdx | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/platform-includes/logs/options/unreal.mdx b/platform-includes/logs/options/unreal.mdx index a2f12044287f9..f981e0bb66b2a 100644 --- a/platform-includes/logs/options/unreal.mdx +++ b/platform-includes/logs/options/unreal.mdx @@ -1,5 +1,3 @@ -## Configuration Options - The following configuration options are available for Sentry Logs in Unreal Engine: | Option | Description | Default | diff --git a/platform-includes/logs/setup/unreal.mdx b/platform-includes/logs/setup/unreal.mdx index 2251f55b948ce..48de2b199e73c 100644 --- a/platform-includes/logs/setup/unreal.mdx +++ b/platform-includes/logs/setup/unreal.mdx @@ -26,6 +26,8 @@ void ConfigureSentryWithLogs() ### Advanced Configuration Options +The Sentry SDK provides you with some advanced options to configure the log capture. + #### Automatic Unreal Engine Log Forwarding You can configure the SDK to automatically forward Unreal Engine's native `UE_LOG` calls to Sentry based on the enabled severity levels: @@ -61,7 +63,7 @@ USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystemInitializeWithSettings(FConfigureSettingsNativeDelegate::CreateLambda([=](USentrySettings* Settings) { Settings->EnableStructuredLogging = true; - + // Only forward logs from specific categories TArray AllowedCategories; AllowedCategories.Add(TEXT("LogGameFlow")); @@ -142,4 +144,4 @@ The `USentryLog` object has the following methods: - `GetLevel()`: Returns the severity level of the log (`ESentryLevel`) - `GetBody()`: Returns the formatted log message (`FString`) - `SetLevel(ESentryLevel Level)`: Sets the Level of the Log Event -- `SetBody(FString& Body)`: Sets the Body of the Log Event \ No newline at end of file +- `SetBody(FString& Body)`: Sets the Body of the Log Event diff --git a/platform-includes/logs/usage/unreal.mdx b/platform-includes/logs/usage/unreal.mdx index f31b9fec907ac..1e80c2ce3a70a 100644 --- a/platform-includes/logs/usage/unreal.mdx +++ b/platform-includes/logs/usage/unreal.mdx @@ -1,6 +1,6 @@ Once logging is enabled, you can send log messages to Sentry using the `AddLog` method. -## Basic Logging +### Basic Logging ```cpp #include "SentrySubsystem.h" @@ -20,7 +20,7 @@ void SendLogs() } ``` -## Log Levels +### Log Levels Sentry Logs supports the following log levels: @@ -41,7 +41,7 @@ SentrySubsystem->AddLog(TEXT("Failed to save game data"), ESentryLevel::Error, T SentrySubsystem->AddLog(TEXT("Critical system failure"), ESentryLevel::Fatal, TEXT("System")); ``` -## Automatic UE_LOG Integration +### Automatic UE_LOG Integration When structured logging is enabled with the appropriate severity levels, the SDK can automatically capture Unreal Engine's native `UE_LOG` calls: @@ -56,11 +56,11 @@ You can configure whether these logs are sent as: - **Structured Logs**: Full log entries with searchable attributes - **Breadcrumbs**: Contextual information attached to errors (useful for debugging) -## Blueprint Support +### Blueprint Support You can also use Sentry Logs from Blueprints by calling the **Add Log** function: 1. Add a **Add Log** node to your Blueprint 2. Set the **Body** parameter to your log message 3. Choose the appropriate **Level** from the dropdown -4. Optionally set a **Category** for better organization \ No newline at end of file +4. Optionally set a **Category** for better organization From b6f177757a3d28a7e965531e5e9077358e5aa22f Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Thu, 11 Dec 2025 14:02:22 +0100 Subject: [PATCH 2/2] Added to 'Features' --- docs/platforms/unity/index.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/platforms/unity/index.mdx b/docs/platforms/unity/index.mdx index 752c948c2ad21..209abaa58384f 100644 --- a/docs/platforms/unity/index.mdx +++ b/docs/platforms/unity/index.mdx @@ -29,6 +29,7 @@ Our Unity SDK builds on top of the [.NET SDK](/platforms/dotnet/) and extends it - [ViewHierarchy attachments](/platforms/unity/enriching-events/view-hierarchy/) for errors - [Offline Caching](/platforms/unity/configuration/options/#InitCacheFlushTimeout) stores event data to disk in case the device is not online - [Release Health](/platforms/unity/configuration/releases/) to keep track of crash-free users and sessions +- [Structured Logging](/platforms/unity/logs/) to capture and send log messages with additional context - [Automatically adding breadcrumbs](/platforms/unity/enriching-events/breadcrumbs/#automatic-breadcrumbs) for - Unity's `Debug.Log` and `Debug.LogWarning` - Scene load, unload, active change