mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-17 15:02:34 +02:00
Don't report errors that don't have exceptions
This commit is contained in:
parent
54bc642476
commit
2487e8ed49
@ -59,7 +59,7 @@ protected override void Write(LogEventInfo logEvent)
|
||||
try
|
||||
{
|
||||
// don't report non-critical events without exceptions
|
||||
if (logEvent.Exception == null && logEvent.Level < LogLevel.Warn)
|
||||
if (logEvent.Exception == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -78,10 +78,15 @@ protected override void Write(LogEventInfo logEvent)
|
||||
{
|
||||
logEvent.Level.ToString(),
|
||||
logEvent.LoggerName,
|
||||
logEvent.Exception?.GetType().ToString()
|
||||
logEvent.Message
|
||||
}
|
||||
};
|
||||
|
||||
if (logEvent.Exception != null)
|
||||
{
|
||||
sentryEvent.Fingerprint.Add(logEvent.Exception.GetType().FullName);
|
||||
}
|
||||
|
||||
sentryEvent.Tags.Add("os_name", Environment.GetEnvironmentVariable("OS_NAME"));
|
||||
sentryEvent.Tags.Add("os_version", Environment.GetEnvironmentVariable("OS_VERSION"));
|
||||
sentryEvent.Tags.Add("runtime_version", Environment.GetEnvironmentVariable("RUNTIME_VERSION"));
|
||||
|
Loading…
Reference in New Issue
Block a user