Conversation
📝 WalkthroughWalkthroughAdds a Logging subsection documenting three client environment variables (NB_LOG_FORMAT, NB_LOG_MAX_SIZE_MB, NB_LOG_DISABLE_ROTATION) and a troubleshooting section describing NetBird's default client.log rotation, Linux logrotate detection/hand-off, archive naming/compression, and how to disable built-in rotation. ChangesClient Logging Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
🧹 Nitpick comments (2)
src/pages/help/troubleshooting-client.mdx (2)
111-111: ⚡ Quick winClarify the auto-detection bypass example.
The example mentions config "outside
/etc/logrotate.d/", but Line 103 states that NetBird scans both/etc/logrotate.confand/etc/logrotate.d/*. The current phrasing might confuse readers into thinking only/etc/logrotate.d/is scanned.📝 Suggested clarification
-If you want to force this behavior on a non-Linux platform, or your `logrotate` config does not match the auto-detection (for example it lives outside `/etc/logrotate.d/` or does not contain the literal string `netbird`), set [`NB_LOG_DISABLE_ROTATION=true`](/client/environment-variables#logging) on the daemon. When the env flag is set, NetBird logs: +If you want to force this behavior on a non-Linux platform, or your `logrotate` config does not match the auto-detection (for example it lives outside the scanned locations or does not contain the literal string `netbird`), set [`NB_LOG_DISABLE_ROTATION=true`](/client/environment-variables#logging) on the daemon. When the env flag is set, NetBird logs:🤖 Prompt for 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. In `@src/pages/help/troubleshooting-client.mdx` at line 111, Clarify the auto-detection bypass example by updating the sentence that currently says "for example it lives outside `/etc/logrotate.d/`" to reflect that NetBird scans both `/etc/logrotate.conf` and `/etc/logrotate.d/*`; specifically, change the phrasing in the paragraph containing the NB_LOG_DISABLE_ROTATION example so it explains a config might be located outside both scanned locations (or not contain the literal string `netbird`) — reference the phrase around `NB_LOG_DISABLE_ROTATION=true` and the mention of `/etc/logrotate.d/` to locate the exact text to edit.
117-119: ⚡ Quick winConsider using
<Warning>instead of<Note>for this critical alert.This content warns about a serious consequence (unbounded log growth), and the PR description refers to it as a "warning box" and "critical warning." The
<Warning>component is available and would better convey the severity. All other<Note>uses in this file (lines 148, 187, 199, 277, 305) are informational rather than cautionary.
⚠️ Suggested component change-<Note> +<Warning> If you disable built-in rotation without configuring an external rotator, `client.log` will grow without bound. Make sure something is rotating the file before turning rotation off. -</Note> +</Warning>🤖 Prompt for 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. In `@src/pages/help/troubleshooting-client.mdx` around lines 117 - 119, Replace the <Note> wrapper around the critical log-rotation message with the <Warning> component so the alert displays with appropriate severity; specifically, locate the block containing the text "If you disable built-in rotation without configuring an external rotator, `client.log` will grow without bound..." and change the surrounding <Note>...</Note> to <Warning>...</Warning>, preserving the inner text and formatting (backticks) and ensuring the closing tag is updated as well.
🤖 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.
Nitpick comments:
In `@src/pages/help/troubleshooting-client.mdx`:
- Line 111: Clarify the auto-detection bypass example by updating the sentence
that currently says "for example it lives outside `/etc/logrotate.d/`" to
reflect that NetBird scans both `/etc/logrotate.conf` and `/etc/logrotate.d/*`;
specifically, change the phrasing in the paragraph containing the
NB_LOG_DISABLE_ROTATION example so it explains a config might be located outside
both scanned locations (or not contain the literal string `netbird`) — reference
the phrase around `NB_LOG_DISABLE_ROTATION=true` and the mention of
`/etc/logrotate.d/` to locate the exact text to edit.
- Around line 117-119: Replace the <Note> wrapper around the critical
log-rotation message with the <Warning> component so the alert displays with
appropriate severity; specifically, locate the block containing the text "If you
disable built-in rotation without configuring an external rotator, `client.log`
will grow without bound..." and change the surrounding <Note>...</Note> to
<Warning>...</Warning>, preserving the inner text and formatting (backticks) and
ensuring the closing tag is updated as well.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e0034fe2-0fb5-4dd8-aec9-d281446f241a
📒 Files selected for processing (2)
src/pages/client/environment-variables.mdxsrc/pages/help/troubleshooting-client.mdx
Adds docs for env variables for logging (including the new
NB_LOG_DISABLE_ROTATION) and troubleshooting using external logging rotation (describing also new detection behavior).Env var page
Troubleshooting page
Summary by CodeRabbit