Skip to content

Commit

Permalink
minor logging tweak re #1114 - make sure that *command* is logged eve…
Browse files Browse the repository at this point in the history
…n 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)
  • Loading branch information
mgravell committed Apr 8, 2019
1 parent 55a4e09 commit de527bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/StackExchange.Redis/ExceptionFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,14 @@ internal static Exception Timeout(ConnectionMultiplexer mutiplexer, string baseE
if (!string.IsNullOrEmpty(baseErrorMessage))
{
sb.Append(baseErrorMessage);
if (message != null)
{
sb.Append(", command=").Append(message.Command); // no key here, note
}
}
else
{
sb.Append("Timeout performing ").Append(message.CommandAndKey).Append(" (").Append(Format.ToString(mutiplexer.TimeoutMilliseconds)).Append("ms)");
sb.Append("Timeout performing ").Append(message.Command).Append(" (").Append(Format.ToString(mutiplexer.TimeoutMilliseconds)).Append("ms)");
}

void add(string lk, string sk, string v)
Expand Down

0 comments on commit de527bb

Please sign in to comment.