📝 refine configured file status docs

This commit is contained in:
Nanaloveyuki
2026-06-13 23:51:37 +08:00
parent 01eb5c6f8d
commit 4e00c5eac5
8 changed files with 16 additions and 16 deletions
@@ -33,8 +33,8 @@ pub fn ConfiguredLogger::file_append_mode(self : ConfiguredLogger) -> Bool {}
Detailed rules explaining key parameters and behaviors
- File-backed sinks report their current append policy.
- Queued file sinks forward the policy from the wrapped file sink.
- File-backed sinks report their current append policy through the wrapped `RuntimeSink`.
- Queued file sinks forward the policy from the wrapped inner file sink.
- Non-file sinks return `false`.
- This helper reports runtime file policy, not whether a file is currently writable.
@@ -33,8 +33,8 @@ pub fn ConfiguredLogger::file_auto_flush(self : ConfiguredLogger) -> Bool {}
Detailed rules explaining key parameters and behaviors
- File-backed sinks report their current auto-flush policy.
- Queued file sinks forward the policy from the wrapped file sink.
- File-backed sinks report their current auto-flush policy through the wrapped `RuntimeSink`.
- Queued file sinks forward the policy from the wrapped inner file sink.
- Non-file sinks return `false`.
- This helper exposes policy state only and does not force any flush action.
+2 -2
View File
@@ -33,9 +33,9 @@ pub fn ConfiguredLogger::file_available(self : ConfiguredLogger) -> Bool {}
Detailed rules explaining key parameters and behaviors
- File-backed runtime sinks report actual file availability.
- File-backed runtime sinks report actual file availability through the wrapped `RuntimeSink`.
- Queued file sinks still expose the availability of their wrapped inner file sink.
- Non-file sinks report `false`.
- Queued file sinks still expose the availability of their wrapped file sink.
- This helper delegates to the runtime sink and does not mutate logger state.
### How to Use
@@ -33,8 +33,8 @@ pub fn ConfiguredLogger::file_flush_failures(self : ConfiguredLogger) -> Int {}
Detailed rules explaining key parameters and behaviors
- File-backed sinks report their recorded flush-failure count.
- Queued file sinks forward the metric from the wrapped file sink.
- File-backed sinks report their recorded flush-failure count through the wrapped `RuntimeSink`.
- Queued file sinks forward the metric from the wrapped inner file sink.
- Non-file sinks return `0`.
- The counter is cumulative until reset.
@@ -33,8 +33,8 @@ pub fn ConfiguredLogger::file_open_failures(self : ConfiguredLogger) -> Int {}
Detailed rules explaining key parameters and behaviors
- File-backed sinks report their recorded open-failure count.
- Queued file sinks forward the metric from the wrapped file sink.
- File-backed sinks report their recorded open-failure count through the wrapped `RuntimeSink`.
- Queued file sinks forward the metric from the wrapped inner file sink.
- Non-file sinks return `0`.
- The counter is cumulative until reset.
+2 -2
View File
@@ -33,8 +33,8 @@ pub fn ConfiguredLogger::file_path(self : ConfiguredLogger) -> String {}
Detailed rules explaining key parameters and behaviors
- File-backed sinks return their current file path.
- Queued file sinks forward the wrapped file sink path.
- File-backed sinks return their current file path through the wrapped `RuntimeSink`.
- Queued file sinks forward the wrapped inner file sink path.
- Non-file sinks return an empty string.
- This helper is observation-only and does not modify file state.
@@ -33,8 +33,8 @@ pub fn ConfiguredLogger::file_rotation_failures(self : ConfiguredLogger) -> Int
Detailed rules explaining key parameters and behaviors
- File-backed sinks report their recorded rotation-failure count.
- Queued file sinks forward the metric from the wrapped file sink.
- File-backed sinks report their recorded rotation-failure count through the wrapped `RuntimeSink`.
- Queued file sinks forward the metric from the wrapped inner file sink.
- Non-file sinks return `0`.
- The counter is cumulative until reset.
@@ -33,8 +33,8 @@ pub fn ConfiguredLogger::file_write_failures(self : ConfiguredLogger) -> Int {}
Detailed rules explaining key parameters and behaviors
- File-backed sinks report their recorded write-failure count.
- Queued file sinks forward the metric from the wrapped file sink.
- File-backed sinks report their recorded write-failure count through the wrapped `RuntimeSink`.
- Queued file sinks forward the metric from the wrapped inner file sink.
- Non-file sinks return `0`.
- The counter is cumulative until reset.