Skip to content

docs: document advanced log rotation options - #105

Open
praveen902012 wants to merge 1 commit into
TryGhost:mainfrom
praveen902012:doc/advanced-log-rotation
Open

docs: document advanced log rotation options#105
praveen902012 wants to merge 1 commit into
TryGhost:mainfrom
praveen902012:doc/advanced-log-rotation

Conversation

@praveen902012

Copy link
Copy Markdown
  • Why are you making it?

By default, Ghost supports advanced log rotation, including size-based log rotation and log compression. This change documents these configuration options in the main documentation so that developers and system administrators can manage their server disk space and log rotation behaviors efficiently.

  • What does it do?

It updates the logging section of

config.mdx
to:

Document the useLibrary flag (which enables the advanced file rotation library using a rotating file stream instead of standard Bunyan rotation).
Document size-based and backup constraints: threshold (size limit per log file) and totalSize (total log storage cap limit).
Document compression and startup options: gzip (to compress rotated logs) and rotateExisting (to force log rotation on startup).

Update the configuration example snippet to showcase these properties.

  • Why is this something Ghost users or developers need?

Without these options documented, administrators must browse source code or issue trackers to find out how to limit log growth or compress logs. Documenting them directly ensures users can easily prevent server disk space exhaustion from large log files.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The logging.rotation MDX example now includes additional rotation controls for library usage, size thresholds, total size limits, compression, and existing files. The rotation reference text also explains size-based rotation, compression, and the default behavior of useLibrary.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: renatoworks

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: documenting advanced log rotation options in the docs.
Description check ✅ Passed The description directly explains the same documentation update and its purpose for users.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 `@config.mdx`:
- Line 766: Update the useLibrary documentation text to remove the duplicated
“stream”, so it reads “rotating file stream instead of classical time-only
Bunyan rotation.”
- Line 770: Update the rotateExisting option description in the configuration
documentation to clarify that startup rotation occurs only when the existing log
file has reached its configured rotation age, rather than for every existing
file. Preserve the option’s boolean behavior and startup context.
🪄 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 Plus

Run ID: 36aa3890-0a36-411f-9340-670dddc08403

📥 Commits

Reviewing files that changed from the base of the PR and between 442327f and bcd01a7.

📒 Files selected for processing (1)
  • config.mdx

Comment thread config.mdx
Comment thread config.mdx
@acburdine

Copy link
Copy Markdown
Member

@praveen902012 this looks good, though I think both of the CodeRabbit suggestions on the PR are valid - is there a reason those were marked resolved?

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.

2 participants