Commit 2777240f authored by Marc Gravell's avatar Marc Gravell

record failure logs even if none passed in

parent 6a340235
......@@ -202,6 +202,13 @@ protected IServer GetAnyMaster(ConnectionMultiplexer muxer)
string channelPrefix = null, Proxy? proxy = null,
string configuration = null,
[CallerMemberName] string caller = null)
{
StringWriter localLog = null;
if(log == null)
{
log = localLog = new StringWriter();
}
try
{
configuration = configuration ?? GetConfiguration();
var config = ConfigurationOptions.Parse(configuration);
......@@ -266,6 +273,12 @@ protected IServer GetAnyMaster(ConnectionMultiplexer muxer)
muxer.Closing += complete => Writer.WriteLine(complete ? "Closed" : "Closing...");
return muxer;
}
catch
{
if (localLog != null) Output?.WriteLine(localLog.ToString());
throw;
}
}
public static string Me([CallerFilePath] string filePath = null, [CallerMemberName] string caller = null) =>
#if NET462
......
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