Skip to content
Prev Previous commit
Next Next commit
Nlog - Android Trimming issue | Add RegisterType SentryNLogOptions in…
… the Setup Extensions of the LogManager to prevent NLog types form getting trimmed
  • Loading branch information
bricefriha committed Nov 11, 2024
commit e812dcfa6ec315e896614549d71a1bb92c6d2ecc
6 changes: 5 additions & 1 deletion src/Sentry.NLog/ConfigurationExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ public static LoggingConfiguration AddSentry(

optionsConfig?.Invoke(options);

LogManager.Setup().SetupExtensions(e => e.RegisterTarget<SentryTarget>("Sentry"));
LogManager.Setup().SetupExtensions(e =>
{
e.RegisterTarget<SentryTarget>("Sentry");
e.RegisterType<SentryNLogOptions>();
});

var target = new SentryTarget(options)
{
Expand Down
Loading