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

Make logged metadata a little more readable #201

Merged
merged 5 commits into from
May 30, 2024
Merged

Conversation

gwynne
Copy link
Member

@gwynne gwynne commented May 29, 2024

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.

@gwynne gwynne added the semver-patch When merged, a new patch version release will be generated label May 29, 2024
@gwynne gwynne requested review from 0xTim, MahdiBM and ptoffy May 29, 2024 19:03
Copy link

@dimitribouniol dimitribouniol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

Comment on lines +83 to +86
var swiftSettings: [SwiftSetting] { [
.enableUpcomingFeature("ForwardTrailingClosures"),
.enableUpcomingFeature("ConciseMagicFile"),
] }

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?

Copy link
Member Author

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).

Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.35%. Comparing base (7cf58ad) to head (dff2989).

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     
Files Coverage Δ
...oleKitTerminal/Terminal/readpassphrase_linux.swift 0.00% <ø> (ø)
.../ConsoleKitTerminal/Utilities/LoggerFragment.swift 80.59% <100.00%> (+0.90%) ⬆️

README.md Outdated Show resolved Hide resolved
@@ -327,11 +327,22 @@ public struct TimestampFragment<S: TimestampSource>: LoggerFragment {
}
}

private extension Logger.MetadataValue {
var descriptionWithoutExcessQuotes: String {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂

@gwynne gwynne merged commit 9f7932f into main May 30, 2024
9 checks passed
@gwynne gwynne deleted the better-metadata-logging branch May 30, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch When merged, a new patch version release will be generated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants