From 915372b724ecdb5dc6a01b16dc4137bb8755fb57 Mon Sep 17 00:00:00 2001 From: Vasileios Zois Date: Thu, 15 Aug 2024 15:55:28 -0700 Subject: [PATCH] log message tags --- libs/cluster/Server/ClusterUtils.cs | 4 ++-- .../CheckpointManagement/DeviceLogCommitCheckpointManager.cs | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/cluster/Server/ClusterUtils.cs b/libs/cluster/Server/ClusterUtils.cs index b780fcb52f..1511bec80b 100644 --- a/libs/cluster/Server/ClusterUtils.cs +++ b/libs/cluster/Server/ClusterUtils.cs @@ -95,8 +95,8 @@ public static void IOCallback(this ILogger logger, uint errorCode, uint numBytes { if (errorCode != 0) { - string errorMessage = new Win32Exception((int)errorCode).Message; - logger.LogError("OverlappedStream GetQueuedCompletionStatus error: {errorCode} msg: {errorMessage}", errorCode, errorMessage); + var errorMessage = new Win32Exception((int)errorCode).Message; + logger.LogError("[ClusterUtils] OverlappedStream GetQueuedCompletionStatus error: {errorCode} msg: {errorMessage}", errorCode, errorMessage); } ((SemaphoreSlim)context).Release(); } diff --git a/libs/storage/Tsavorite/cs/src/core/Index/CheckpointManagement/DeviceLogCommitCheckpointManager.cs b/libs/storage/Tsavorite/cs/src/core/Index/CheckpointManagement/DeviceLogCommitCheckpointManager.cs index 017820e73c..90638842ab 100644 --- a/libs/storage/Tsavorite/cs/src/core/Index/CheckpointManagement/DeviceLogCommitCheckpointManager.cs +++ b/libs/storage/Tsavorite/cs/src/core/Index/CheckpointManagement/DeviceLogCommitCheckpointManager.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.IO; using System.Linq; using System.Threading; @@ -426,7 +427,8 @@ private unsafe void IOCallback(uint errorCode, uint numBytes, object context) { if (errorCode != 0) { - logger?.LogError("OverlappedStream GetQueuedCompletionStatus error: {0}", errorCode); + var errorMessage = new Win32Exception((int)errorCode).Message; + logger?.LogError("[DeviceLogManager] OverlappedStream GetQueuedCompletionStatus error: {errorCode} msg: {errorMessage}", errorCode, errorMessage); } semaphore.Release(); }