Skip to content

Commit d8cf184

Browse files
authored
fix: mistaken log message (#210)
1 parent 49fc2b5 commit d8cf184

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/Enyim.Caching/MemcachedClient.cs

+8-7
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
using Enyim.Caching.Memcached.Results.Factories;
66
using Microsoft.Extensions.Caching.Distributed;
77
using Microsoft.Extensions.Logging;
8-
using Microsoft.Extensions.Options;
98
using System;
109
using System.Collections.Generic;
11-
using System.Diagnostics;
12-
using System.Linq;
1310
using System.Net;
1411
using System.Threading;
1512
using System.Threading.Tasks;
@@ -678,13 +675,17 @@ protected virtual IStoreOperationResult PerformStore(StoreMode mode, string key,
678675
{
679676
CacheItem item;
680677

681-
try { item = _transcoder.Serialize(value); }
682-
catch (Exception e)
678+
try
679+
{
680+
item = _transcoder.Serialize(value);
681+
}
682+
catch (Exception ex)
683683
{
684-
_logger.LogError("PerformStore", e);
684+
_logger.LogError(ex, "PerformStore failed with '{key}' key", key);
685+
685686
if (!_suppressException) throw;
686687

687-
result.Fail("PerformStore failed", e);
688+
result.Fail("PerformStore failed", ex);
688689
return result;
689690
}
690691

0 commit comments

Comments
 (0)