From 45ede8b06aec2abb906dd7771675090d59d39dd6 Mon Sep 17 00:00:00 2001 From: JKorf Date: Mon, 7 May 2018 13:06:46 +0200 Subject: [PATCH] Fix for log level not being respected --- CryptoExchange.Net/CryptoExchange.Net.csproj | 2 +- CryptoExchange.Net/Logging/Log.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CryptoExchange.Net/CryptoExchange.Net.csproj b/CryptoExchange.Net/CryptoExchange.Net.csproj index fdd0a7e..ad98ab8 100644 --- a/CryptoExchange.Net/CryptoExchange.Net.csproj +++ b/CryptoExchange.Net/CryptoExchange.Net.csproj @@ -7,7 +7,7 @@ CryptoExchange.Net JKorf - 0.0.24 + 0.0.25 false https://github.com/JKorf/CryptoExchange.Net https://github.com/JKorf/CryptoExchange.Net/blob/master/LICENSE diff --git a/CryptoExchange.Net/Logging/Log.cs b/CryptoExchange.Net/Logging/Log.cs index 1557031..98823bd 100644 --- a/CryptoExchange.Net/Logging/Log.cs +++ b/CryptoExchange.Net/Logging/Log.cs @@ -37,6 +37,9 @@ namespace CryptoExchange.Net.Logging public void Write(LogVerbosity logType, string message) { + if ((int)logType < (int)Level) + return; + string logMessage = $"{DateTime.Now:yyyy/MM/dd HH:mm:ss:fff} | {logType} | {message}"; foreach (var writer in writers.ToList()) {