Skip to content

Commit de527bb

Browse files
committed
minor logging tweak re #1114 - make sure that *command* is logged even when a base-error-message is provided; either way, *only* report the Command, not the CommandAndKey (we will add that later if detail is permitted)
1 parent 55a4e09 commit de527bb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/StackExchange.Redis/ExceptionFactory.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,14 @@ internal static Exception Timeout(ConnectionMultiplexer mutiplexer, string baseE
188188
if (!string.IsNullOrEmpty(baseErrorMessage))
189189
{
190190
sb.Append(baseErrorMessage);
191+
if (message != null)
192+
{
193+
sb.Append(", command=").Append(message.Command); // no key here, note
194+
}
191195
}
192196
else
193197
{
194-
sb.Append("Timeout performing ").Append(message.CommandAndKey).Append(" (").Append(Format.ToString(mutiplexer.TimeoutMilliseconds)).Append("ms)");
198+
sb.Append("Timeout performing ").Append(message.Command).Append(" (").Append(Format.ToString(mutiplexer.TimeoutMilliseconds)).Append("ms)");
195199
}
196200

197201
void add(string lk, string sk, string v)

0 commit comments

Comments
 (0)