ConsoleLogRecordExporter modified to support Message and StateValues#1871
Merged
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
|
reyang
reviewed
Mar 6, 2021
| this.WriteLine($"{"LogRecord.State:".PadRight(rightPaddingLength)}{logRecord.State}"); | ||
| if (logRecord.Message != null) | ||
| { | ||
| this.WriteLine($"{"LogRecord.Message:".PadRight(rightPaddingLength)}{logRecord.Message}"); |
Member
There was a problem hiding this comment.
Hey, I am wondering if we could output a markdown table, similar like what Benchmark.Net did?
Member
Author
There was a problem hiding this comment.
let me try to get that! would make the getting-started readme looks nicer.
reyang
reviewed
Mar 6, 2021
| 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}"); |
Member
There was a problem hiding this comment.
This padding would leave : on the right, a bit weird.
Member
There was a problem hiding this comment.
You can see it in the picture in the description, it does look a bit odd.
…en-telemetry/opentelemetry-dotnet into cijothomas/consolelogexporter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#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.
