Skip to content

Add quiet config option#181

Open
karaolidis wants to merge 1 commit into
pelican-dev:mainfrom
karaolidis:quiet
Open

Add quiet config option#181
karaolidis wants to merge 1 commit into
pelican-dev:mainfrom
karaolidis:quiet

Conversation

@karaolidis

@karaolidis karaolidis commented Jun 2, 2026

Copy link
Copy Markdown

Useful when running as a systemd service, prevents journal polution. Alternative is a log-level option, but that would conflict with the already existing debug flag. I'll leave the choice up to the maintainers.

Summary by CodeRabbit

  • New Features
    • Added a Quiet mode setting to enable minimal logging output while preserving full debug behavior.
  • Behavior Changes
    • When Quiet mode is active (and not in debug), the app suppresses non-critical messages and the startup logo, and reduces logging to warnings.

@karaolidis karaolidis requested a review from a team as a code owner June 2, 2026 14:02
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ac6e88b8-5dd5-4d40-b69c-58a877073aea

📥 Commits

Reviewing files that changed from the base of the PR and between 799319e and a0b31e2.

📒 Files selected for processing (2)
  • cmd/root.go
  • config/config.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • config/config.go
📜 Recent review details
🔇 Additional comments (2)
cmd/root.go (2)

113-115: LGTM!


456-457: LGTM!


📝 Walkthrough

Walkthrough

Adds a Quiet boolean to Configuration; initLogging sets the global logger to Warn when Quiet is true and Debug is false; the root command suppresses the wings logo when Quiet is enabled unless Debug is active.

Changes

Quiet mode for logging

Layer / File(s) Summary
Quiet configuration field
config/config.go
Configuration struct receives a new Quiet boolean field with documentation describing minimal logging behavior and interaction with Debug.
Logging and CLI output honor Quiet mode
cmd/root.go
initLogging sets log level to Warn when Quiet is true (and Debug is false); rootCmdRun skips printing the logo when Quiet is set unless Debug is enabled.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

A rabbit tucks logs nice and tight,
Quiet set means hush tonight,
Warnings glow, the rest take flight,
Debug will wake the morning light,
Soft hops, soft code—everything's alright. 🐰

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Add quiet config option' directly and clearly summarizes the main change: adding a new quiet configuration option to suppress logging output.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmd/root.go`:
- Around line 454-455: The startup banner is still printed to journald because
rootCmdRun calls printLogo() unconditionally; update rootCmdRun (or printLogo)
to respect config.Get().Quiet so the banner is skipped when Quiet is true.
Specifically, either wrap the printLogo() call in rootCmdRun with a check like
if !config.Get().Quiet before calling it, or modify printLogo() to return early
when config.Get().Quiet is true, ensuring log.SetLevel alone doesn't allow the
ASCII banner to be emitted.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fe3bd540-9614-4aef-885e-ee0c46ddd62f

📥 Commits

Reviewing files that changed from the base of the PR and between 89b5212 and 799319e.

📒 Files selected for processing (2)
  • cmd/root.go
  • config/config.go

Comment thread cmd/root.go
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant