-
Notifications
You must be signed in to change notification settings - Fork 5
feature: skip_line_ending option #76
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
Conversation
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughA new exported boolean field Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Call as Caller
participant Cfg as Config (with SkipLineEnding)
participant Init as InitDefault
participant BL as BuildLogger
participant Enc as Zap EncoderConfig
Note over Cfg,Init: Configuration initialization
Call->>Cfg: provide config (may omit LineEnding)
Cfg->>Init: InitDefault(cfg)
alt LineEnding empty
Init-->>Cfg: do not auto-set LineEnding (SkipLineEnding governs)
else LineEnding present
Init-->>Cfg: keep explicit LineEnding
end
Note over Cfg,BL: Logger build uses coordinated policy
Call->>BL: BuildLogger(cfg)
BL->>Enc: set EncoderConfig fields
BL->>Enc: set SkipLineEnding = cfg.SkipLineEnding
Enc-->>BL: encoder(s) created with SkipLineEnding applied
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Pull Request Overview
Introduce a new logs configuration option to disable line endings in logger output.
- Add skip_line_ending option to Config
- Adjust default initialization for line-ending behavior
- Wire the new option into logger construction
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| config.go | Adds SkipLineEnding to Config, updates InitDefault logic, and attempts to pass SkipLineEnding into zapcore.EncoderConfig |
| go.work.sum | Tooling-generated dependency checksum updates (no functional code changes) |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
go.work.sumis excluded by!**/*.sum
📒 Files selected for processing (1)
config.go(7 hunks)
🔇 Additional comments (2)
config.go (2)
79-80: LGTM! Field declaration is correct.The new
SkipLineEndingconfiguration field is properly defined with appropriate visibility, naming, and documentation.
123-123: LGTM! Consistent propagation across all logger modes.The
SkipLineEndingfield is correctly propagated to all ZapEncoderConfiginstances (production, development, raw, and default modes), ensuring consistent behavior across all logger configurations.Also applies to: 146-146, 163-163, 181-181
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #76 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Reason for This PR
ref: roadrunner-server/roadrunner#2146
Description of Changes
skip_line_endingfor logs configuration. When set, ignores any value in theline_endingoption and uses no line endings.License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the MIT license.
PR Checklist
[Author TODO: Meet these criteria.][Reviewer TODO: Verify that these criteria are met. Request changes if not]git commit -s).CHANGELOG.md.Summary by CodeRabbit