Skip to content

Commit f0b2f5f

Browse files
committed
Improve logging
1 parent cd024e5 commit f0b2f5f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Enyim.Caching/Memcached/MemcachedNode.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,8 @@ protected virtual IPooledSocketResult ExecuteOperation(IOperation op)
574574
}
575575
else
576576
{
577-
result.Fail("Failed to obtain socket from pool");
577+
var errorMsg = string.IsNullOrEmpty(result.Message) ? "Failed to acquire a socket from pool" : result.Message;
578+
_logger.LogError(errorMsg);
578579
return result;
579580
}
580581

@@ -622,7 +623,8 @@ protected async virtual Task<IPooledSocketResult> ExecuteOperationAsync(IOperati
622623
}
623624
else
624625
{
625-
result.Fail("Failed to obtain socket from pool");
626+
var errorMsg = string.IsNullOrEmpty(result.Message) ? "Failed to acquire a socket from pool" : result.Message;
627+
_logger.LogError(errorMsg);
626628
return result;
627629
}
628630

0 commit comments

Comments
 (0)