Commit f8964f92 authored by Marc Gravell's avatar Marc Gravell

Merge branch 'master' of github.com:StackExchange/StackExchange.Redis into core-rtm

parents b42583a8 32807af6
......@@ -366,9 +366,20 @@ public void SetDefaultPorts()
}
/// <summary>
/// Returns the effective configuration string for this configuration
/// Returns the effective configuration string for this configuration, including Redis credentials.
/// </summary>
public override string ToString()
{
// include password to allow generation of configuration strings
// used for connecting multiplexer
return ToString(includePassword: true);
}
/// <summary>
/// Returns the effective configuration string for this configuration
/// with the option to include or exclude the password from the string.
/// </summary>
public string ToString(bool includePassword)
{
var sb = new StringBuilder();
foreach (var endpoint in endpoints)
......@@ -382,7 +393,7 @@ public override string ToString()
Append(sb, OptionKeys.AllowAdmin, allowAdmin);
Append(sb, OptionKeys.Version, defaultVersion);
Append(sb, OptionKeys.ConnectTimeout, connectTimeout);
Append(sb, OptionKeys.Password, password);
Append(sb, OptionKeys.Password, includePassword ? password : "*****");
Append(sb, OptionKeys.TieBreaker, tieBreaker);
Append(sb, OptionKeys.WriteBuffer, writeBuffer);
Append(sb, OptionKeys.Ssl, ssl);
......
......@@ -1197,7 +1197,7 @@ internal async Task<bool> ReconfigureAsync(bool first, bool reconfigureAll, Text
Trace("Starting reconfiguration...");
Trace(blame != null, "Blaming: " + Format.ToString(blame));
LogLocked(log, Configuration);
LogLocked(log, configuration.ToString(includePassword: false));
LogLocked(log, "");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment