diff --git a/samples/CSharpAvalonia/MemoryLogger.cs b/samples/CSharpAvalonia/MemoryLogger.cs index 8e290e98..d70e91aa 100644 --- a/samples/CSharpAvalonia/MemoryLogger.cs +++ b/samples/CSharpAvalonia/MemoryLogger.cs @@ -28,6 +28,7 @@ public class MemoryLogger : IVelopackLogger public void Log(VelopackLogLevel logLevel, string message, Exception exception) { + if (logLevel < VelopackLogLevel.Information) return; lock (_sb) { message = $"{logLevel}: {message}"; if (exception != null) message += "\n" + exception.ToString(); diff --git a/samples/CSharpWpf/MemoryLogger.cs b/samples/CSharpWpf/MemoryLogger.cs index 2daf978f..ce96e0eb 100644 --- a/samples/CSharpWpf/MemoryLogger.cs +++ b/samples/CSharpWpf/MemoryLogger.cs @@ -28,6 +28,7 @@ public class MemoryLogger : IVelopackLogger public void Log(VelopackLogLevel logLevel, string message, Exception exception) { + if (logLevel < VelopackLogLevel.Information) return; lock (_sb) { message = $"{logLevel}: {message}"; if (exception != null) message += "\n" + exception.ToString();