tylerjensen/ServiceWire

LogOnlyToConsole options writes "System.String[]" instead of expected output using 5.5.2

refurbs opened this issue · 4 comments

LogOnlyToConsole options writes "System.String[]" instead of expected output using 5.5.2

Please provide a reproducible example.

// Create new logger
var logger = new Logger(logLevel: LogLevel.Info, options: LogOptions.LogOnlyToConsole, messageBufferSize: 0));

// Write log entry
logger.Info("Processing request - Name:{0}, Id: {1}", name, id);

Log output:
"System.String[]"

Looks like the issue is on line 70 of https://github.com/tylerjensen/ServiceWire/blob/master/src/ServiceWire/LoggerBase.cs

Changing that line locally to one below seemed to work for me, but perhaps there's a better solution?

lines.ToList().ForEach(line => Console.WriteLine(line));

Please submit a PR.

My time has been very limited. I'll try to get to this in the next version.