📝 refine configured file setters docs

This commit is contained in:
Nanaloveyuki
2026-06-13 23:53:41 +08:00
parent 4e00c5eac5
commit 1e568f55cd
6 changed files with 12 additions and 12 deletions
@@ -33,8 +33,8 @@ pub fn ConfiguredLogger::file_clear_rotation(self : ConfiguredLogger) -> Bool {}
Detailed rules explaining key parameters and behaviors
- File-backed sinks clear their runtime rotation policy.
- Queued file sinks forward the update to the wrapped file sink.
- File-backed sinks clear their runtime rotation policy through the wrapped `RuntimeSink`.
- Queued file sinks forward the update to the wrapped inner file sink.
- Non-file sinks return `false`.
- This helper is equivalent in intent to setting rotation to `None`, but is clearer at the call site.
@@ -33,8 +33,8 @@ pub fn ConfiguredLogger::file_rotation_config(self : ConfiguredLogger) -> FileRo
Detailed rules explaining key parameters and behaviors
- File-backed sinks return their current rotation configuration when enabled.
- Queued file sinks forward the config from the wrapped file sink.
- File-backed sinks return their current rotation configuration when enabled through the wrapped `RuntimeSink`.
- Queued file sinks forward the config from the wrapped inner file sink.
- Non-file sinks return `None`.
- This helper is useful when callers need active runtime rotation parameters rather than only a boolean flag.
@@ -33,8 +33,8 @@ pub fn ConfiguredLogger::file_rotation_enabled(self : ConfiguredLogger) -> Bool
Detailed rules explaining key parameters and behaviors
- File-backed sinks report whether a rotation config is active.
- Queued file sinks forward the state from the wrapped file sink.
- File-backed sinks report whether a rotation config is active through the wrapped `RuntimeSink`.
- Queued file sinks forward the state from the wrapped inner file sink.
- Non-file sinks return `false`.
- This helper is narrower than `file_rotation_config()` when only a yes/no check is needed.
@@ -34,8 +34,8 @@ pub fn ConfiguredLogger::file_set_append_mode(self : ConfiguredLogger, append :
Detailed rules explaining key parameters and behaviors
- File-backed sinks update their stored append policy.
- Queued file sinks forward the policy update to the wrapped file sink.
- File-backed sinks update their stored append policy through the wrapped `RuntimeSink`.
- Queued file sinks forward the policy update to the wrapped inner file sink.
- This helper updates policy only; it does not force immediate reopen.
- Non-file sinks return `false`.
@@ -34,8 +34,8 @@ pub fn ConfiguredLogger::file_set_auto_flush(self : ConfiguredLogger, enabled :
Detailed rules explaining key parameters and behaviors
- File-backed sinks update their runtime auto-flush policy.
- Queued file sinks forward the update to the wrapped file sink.
- File-backed sinks update their runtime auto-flush policy through the wrapped `RuntimeSink`.
- Queued file sinks forward the update to the wrapped inner file sink.
- Non-file sinks return `false`.
- This helper changes policy only; it does not itself flush pending data.
@@ -37,8 +37,8 @@ pub fn ConfiguredLogger::file_set_rotation(
Detailed rules explaining key parameters and behaviors
- File-backed sinks update their runtime rotation policy.
- Queued file sinks forward the update to the wrapped file sink.
- File-backed sinks update their runtime rotation policy through the wrapped `RuntimeSink`.
- Queued file sinks forward the update to the wrapped inner file sink.
- Passing `None` disables rotation.
- Non-file sinks return `false`.