Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
refurbs opened this issue Oct 16, 2023 · 4 comments

Comments

@refurbs
Copy link

refurbs commented Oct 16, 2023

No description provided.

@tylerje
Copy link
Member

tylerje commented Oct 16, 2023

Please provide a reproducible example.

@refurbs
Copy link
Author

refurbs commented Oct 21, 2023

// 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));

@tylerje
Copy link
Member

tylerje commented Nov 3, 2023

Please submit a PR.

@tylerje
Copy link
Member

tylerje commented Jan 11, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants