Add explicit append and truncate reopen helpers

This commit is contained in:
Nanaloveyuki
2026-05-10 12:55:02 +08:00
parent c779befc23
commit 1a9dfe2397
8 changed files with 62 additions and 19 deletions
+1
View File
@@ -38,6 +38,7 @@ version 0.3.0
- feat: add runtime file-policy mutators `set_auto_flush(...)`, `set_rotation(...)`, `clear_rotation()` and corresponding configured-logger forwarding helpers
- feat: add explicit append-policy setter `set_append_mode(...)` / `file_set_append_mode(...)` so append strategy can be updated without piggybacking on `reopen(...)`
- feat: add explicit `reopen_with_current_policy()` / `file_reopen_with_current_policy()` helpers so stored append-policy reopen is discoverable instead of implicit
- feat: add `reopen_append()` / `reopen_truncate()` and configured-logger forwarding helpers so common append-vs-truncate reopen flows do not need raw `Some(true/false)` calls
- feat: add `SplitSink`, `split_sink(...)`, and `split_by_level(...)` for routing records into different sinks by predicate or level
- feat: add `Logger::bind(...)` as an ergonomic context-binding alias and `fields(...)` helper for tuple-based field construction