Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/platforms/unity/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions platform-includes/logs/options/unreal.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
## Configuration Options

The following configuration options are available for Sentry Logs in Unreal Engine:

| Option | Description | Default |
Expand Down
6 changes: 4 additions & 2 deletions platform-includes/logs/setup/unreal.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -61,7 +63,7 @@ USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem<USentrySubsystem
SentrySubsystem->InitializeWithSettings(FConfigureSettingsNativeDelegate::CreateLambda([=](USentrySettings* Settings)
{
Settings->EnableStructuredLogging = true;

// Only forward logs from specific categories
TArray<FString> AllowedCategories;
AllowedCategories.Add(TEXT("LogGameFlow"));
Expand Down Expand Up @@ -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
- `SetBody(FString& Body)`: Sets the Body of the Log Event
10 changes: 5 additions & 5 deletions platform-includes/logs/usage/unreal.mdx
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -20,7 +20,7 @@ void SendLogs()
}
```

## Log Levels
### Log Levels

Sentry Logs supports the following log levels:

Expand All @@ -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:

Expand All @@ -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
4. Optionally set a **Category** for better organization