Skip to content

feat: implement daemon transfer log format engine - #2387

Merged
oferchen merged 1 commit into
masterfrom
feature/daemon-log-format-v3
Feb 21, 2026
Merged

oferchen merged 1 commit into
masterfrom
feature/daemon-log-format-v3

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Add log_format.rs with daemon transfer log format expansion engine matching upstream rsync's rsyncd.conf(5) log format directive
  • Support all standard format escapes: %o (operation), %h (hostname), %a (remote addr), %m (module), %u (username), %f (filename), %l (file length), %p (PID), %P (module path), %t (timestamp), %b (bytes transferred), %c (bytes checksumed), %i (itemize string), %% (literal percent)
  • Wire transfer logging into execute_transfer() so successful daemon transfers emit log lines when transfer_logging is enabled
  • Add transfer_logging and log_format directives to fallback config generation in server_runtime.rs
  • Include 53 unit tests covering all escapes, edge cases, timestamp formatting, and civil date conversion

Test plan

  • All 842 daemon tests pass (cargo nextest run -p daemon --all-features)
  • Clippy clean (cargo clippy -p daemon --all-targets --all-features --no-deps -- -D warnings)
  • Formatting clean (cargo fmt -p daemon -- --check)
  • CI passes (fmt+clippy, nextest, Windows, macOS, Linux musl)

@github-actions github-actions Bot added the enhancement New feature or request label Feb 21, 2026
Add per-transfer logging support to the rsync daemon, matching
upstream's `transfer logging` and `log format` directives from
rsyncd.conf(5).

- Add log_format.rs with format string expansion engine supporting
  all upstream percent-escapes (%o, %h, %a, %m, %u, %f, %l, %p,
  %P, %t, %b, %c, %i, %%)
- Wire log_transfer() into execute_transfer() on the success path,
  before post-xfer exec runs
- Add transfer_logging and log_format to fallback config generation
- Comprehensive tests for format expansion, timestamp formatting,
  and civil date conversion
@oferchen
oferchen force-pushed the feature/daemon-log-format-v3 branch from acae8e2 to d32174b Compare February 21, 2026 15:15
@oferchen
oferchen merged commit 5843e59 into master Feb 21, 2026
7 of 8 checks passed
@oferchen
oferchen deleted the feature/daemon-log-format-v3 branch February 21, 2026 15:17
oferchen added a commit that referenced this pull request May 1, 2026
Add per-transfer logging support to the rsync daemon, matching
upstream's `transfer logging` and `log format` directives from
rsyncd.conf(5).

- Add log_format.rs with format string expansion engine supporting
  all upstream percent-escapes (%o, %h, %a, %m, %u, %f, %l, %p,
  %P, %t, %b, %c, %i, %%)
- Wire log_transfer() into execute_transfer() on the success path,
  before post-xfer exec runs
- Add transfer_logging and log_format to fallback config generation
- Comprehensive tests for format expansion, timestamp formatting,
  and civil date conversion
oferchen added a commit that referenced this pull request May 5, 2026
Add per-transfer logging support to the rsync daemon, matching
upstream's `transfer logging` and `log format` directives from
rsyncd.conf(5).

- Add log_format.rs with format string expansion engine supporting
  all upstream percent-escapes (%o, %h, %a, %m, %u, %f, %l, %p,
  %P, %t, %b, %c, %i, %%)
- Wire log_transfer() into execute_transfer() on the success path,
  before post-xfer exec runs
- Add transfer_logging and log_format to fallback config generation
- Comprehensive tests for format expansion, timestamp formatting,
  and civil date conversion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant