-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Make logged metadata a little more readable #201
Conversation
…ore by descending recursively into dictionary and array metadata.
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.
💯
var swiftSettings: [SwiftSetting] { [ | ||
.enableUpcomingFeature("ForwardTrailingClosures"), | ||
.enableUpcomingFeature("ConciseMagicFile"), | ||
] } |
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.
Mostly curiosity, is there a reason we are opting for a computed property here rather than a constant?
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.
Because it lets me put the settings at the bottom of the file instead of the top (and I must admit it was @MahdiBM who came up with that).
…pite changes to the file.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #201 +/- ##
==========================================
+ Coverage 48.07% 48.35% +0.28%
==========================================
Files 45 45
Lines 1762 1764 +2
==========================================
+ Hits 847 853 +6
+ Misses 915 911 -4
|
@@ -327,11 +327,22 @@ public struct TimestampFragment<S: TimestampSource>: LoggerFragment { | |||
} | |||
} | |||
|
|||
private extension Logger.MetadataValue { | |||
var descriptionWithoutExcessQuotes: String { |
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.
😂
These changes are now available in 4.14.3
We now explicitly suppress excess
"
characters recursively in logger metadata.Also bumps the package to a minimum of Swift 5.8 and fixes some warnings.