Skip to content

Commit 7046237

Browse files
authored
fix(Unreal): Structured Logging Headers (#15787)
1 parent 11dd086 commit 7046237

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

platform-includes/logs/options/unreal.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
## Configuration Options
2-
31
The following configuration options are available for Sentry Logs in Unreal Engine:
42

53
| Option | Description | Default |

platform-includes/logs/setup/unreal.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ void ConfigureSentryWithLogs()
2626

2727
### Advanced Configuration Options
2828

29+
The Sentry SDK provides you with some advanced options to configure the log capture.
30+
2931
#### Automatic Unreal Engine Log Forwarding
3032

3133
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->GetEngineSubsystem<USentrySubsystem
6163
SentrySubsystem->InitializeWithSettings(FConfigureSettingsNativeDelegate::CreateLambda([=](USentrySettings* Settings)
6264
{
6365
Settings->EnableStructuredLogging = true;
64-
66+
6567
// Only forward logs from specific categories
6668
TArray<FString> AllowedCategories;
6769
AllowedCategories.Add(TEXT("LogGameFlow"));
@@ -142,4 +144,4 @@ The `USentryLog` object has the following methods:
142144
- `GetLevel()`: Returns the severity level of the log (`ESentryLevel`)
143145
- `GetBody()`: Returns the formatted log message (`FString`)
144146
- `SetLevel(ESentryLevel Level)`: Sets the Level of the Log Event
145-
- `SetBody(FString& Body)`: Sets the Body of the Log Event
147+
- `SetBody(FString& Body)`: Sets the Body of the Log Event

platform-includes/logs/usage/unreal.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Once logging is enabled, you can send log messages to Sentry using the `AddLog` method.
22

3-
## Basic Logging
3+
### Basic Logging
44

55
```cpp
66
#include "SentrySubsystem.h"
@@ -20,7 +20,7 @@ void SendLogs()
2020
}
2121
```
2222

23-
## Log Levels
23+
### Log Levels
2424

2525
Sentry Logs supports the following log levels:
2626

@@ -41,7 +41,7 @@ SentrySubsystem->AddLog(TEXT("Failed to save game data"), ESentryLevel::Error, T
4141
SentrySubsystem->AddLog(TEXT("Critical system failure"), ESentryLevel::Fatal, TEXT("System"));
4242
```
4343
44-
## Automatic UE_LOG Integration
44+
### Automatic UE_LOG Integration
4545
4646
When structured logging is enabled with the appropriate severity levels, the SDK can automatically capture Unreal Engine's native `UE_LOG` calls:
4747
@@ -56,11 +56,11 @@ You can configure whether these logs are sent as:
5656
- **Structured Logs**: Full log entries with searchable attributes
5757
- **Breadcrumbs**: Contextual information attached to errors (useful for debugging)
5858

59-
## Blueprint Support
59+
### Blueprint Support
6060

6161
You can also use Sentry Logs from Blueprints by calling the **Add Log** function:
6262

6363
1. Add a **Add Log** node to your Blueprint
6464
2. Set the **Body** parameter to your log message
6565
3. Choose the appropriate **Level** from the dropdown
66-
4. Optionally set a **Category** for better organization
66+
4. Optionally set a **Category** for better organization

0 commit comments

Comments
 (0)