-
Notifications
You must be signed in to change notification settings - Fork 765
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
ConsoleLogRecordExporter modified to support Message and StateValues #1871
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1871 +/- ##
==========================================
- Coverage 83.77% 83.32% -0.46%
==========================================
Files 187 189 +2
Lines 5967 6123 +156
==========================================
+ Hits 4999 5102 +103
- Misses 968 1021 +53
|
this.WriteLine($"{"LogRecord.State:".PadRight(rightPaddingLength)}{logRecord.State}"); | ||
if (logRecord.Message != null) | ||
{ | ||
this.WriteLine($"{"LogRecord.Message:".PadRight(rightPaddingLength)}{logRecord.Message}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, I am wondering if we could output a markdown table, similar like what Benchmark.Net did?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me try to get that! would make the getting-started readme looks nicer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
this.WriteLine("LogRecord.StateValues (Key:Value):"); | ||
for (int i = 0; i < logRecord.StateValues.Count; i++) | ||
{ | ||
this.WriteLine($"{logRecord.StateValues[i].Key.PadRight(rightPaddingLength)}:{logRecord.StateValues[i].Value}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This padding would leave :
on the right, a bit weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can see it in the picture in the description, it does look a bit odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…en-telemetry/opentelemetry-dotnet into cijothomas/consolelogexporter
#1869 expanded LogRecord to have formatted message and higher-perf StateValues.
This PR is modifying ConsoleExporter to support these additional fields.
When right options are enabled, the following output is produced.