mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-02-17 14:07:28 +08:00
- Update hbb_common submodule to add size-based log rotation - Logs now rotate when they reach 100MB OR daily (whichever comes first) - Create comprehensive LOG_MANAGEMENT.md documentation - Add patch file for reference and future hbb_common updates - Maximum disk usage limited to ~3.1GB (31 files × 100MB each) Co-authored-by: rustdesk <71636191+rustdesk@users.noreply.github.com>
1.4 KiB
1.4 KiB
Patches for hbb_common
This directory contains patches that should be applied to the hbb_common library submodule.
hbb_common-log-rotation.patch
Purpose: Add size-based log rotation to prevent excessive disk usage
Apply to: libs/hbb_common submodule
Target repository: https://github.com/rustdesk/hbb_common
How to apply
Option 1: Apply in hbb_common repository
cd /path/to/hbb_common
git apply /path/to/rustdesk/docs/patches/hbb_common-log-rotation.patch
git commit -m "Add size-based log rotation to prevent excessive disk usage"
Option 2: Apply in rustdesk repository submodule
cd libs/hbb_common
git apply ../../docs/patches/hbb_common-log-rotation.patch
git commit -m "Add size-based log rotation to prevent excessive disk usage"
# Note: This creates a local commit in the submodule
What it does
- Changes log rotation from age-only to age-or-size based
- Rotates logs when they reach 100MB OR daily (whichever comes first)
- Limits total log storage to ~3.1GB (31 files × 100MB max each)
- Prevents runaway log files from consuming excessive disk space
Testing
After applying the patch and rebuilding:
- Verify logs are created in the standard location
- Check that individual log files don't exceed 100MB
- Confirm old files are still cleaned up after 31 days
- Ensure log content is still complete and useful
See ../LOG_MANAGEMENT.md for complete documentation.