Skip to content

Commit 4a905ff

Browse files
yaira2hishitetsu0x5bfa
authored
Code Quality: Filter out LogLevel.Information (#15916)
Co-authored-by: hishitetsu <[email protected]> Co-authored-by: 0x5BFA <[email protected]>
1 parent 2c98606 commit 4a905ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Files.App/Utils/Logger/SentryLogger.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ public bool IsEnabled(LogLevel logLevel)
2323
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
2424
{
2525
// Unhandled exceptions are captured in AppLifecycleHelper.HandleAppUnhandledException
26-
if (exception is null || exception.Data[Mechanism.HandledKey] is false)
26+
if (exception is null ||
27+
exception.Data[Mechanism.HandledKey] is false ||
28+
logLevel <= LogLevel.Information)
2729
return;
2830

2931
var generalSettingsService = Ioc.Default.GetRequiredService<IGeneralSettingsService>();

0 commit comments

Comments
 (0)