From 3c3cce3b0b3e15d0914bdf060d0966579441790b Mon Sep 17 00:00:00 2001 From: sfc-gh-ext-simba-hx Date: Wed, 29 Nov 2023 16:54:05 -0800 Subject: [PATCH] fix for review comment --- Snowflake.Data/Core/QueryContextCache.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Snowflake.Data/Core/QueryContextCache.cs b/Snowflake.Data/Core/QueryContextCache.cs index 1efbd9a12..74d041d2b 100644 --- a/Snowflake.Data/Core/QueryContextCache.cs +++ b/Snowflake.Data/Core/QueryContextCache.cs @@ -337,12 +337,13 @@ private void ReplaceQCE(QueryContextElement oldQCE, QueryContextElement newQCE) /** Debugging purpose, log the all entries in the cache. */ private void LogCacheEntries() { -#if DEBUG - foreach (QueryContextElement elem in _cacheSet) + if (_logger.IsDebugEnabled()) { - _logger.Debug($"Cache Entry: id: {elem.Id} readTimestamp: {elem.ReadTimestamp} priority: {elem.Priority}"); + foreach (QueryContextElement elem in _cacheSet) + { + _logger.Debug($"Cache Entry: id: {elem.Id} readTimestamp: {elem.ReadTimestamp} priority: {elem.Priority}"); + } } -#endif } } }