mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-07-24 00:42:18 +00:00
📝 align runtime file examples
This commit is contained in:
@@ -55,7 +55,7 @@ In this example, the file policy can be passed around as one typed value instead
|
||||
|
||||
When current file behavior should be read, adjusted, and written back:
|
||||
```moonbit
|
||||
let policy = sink.file_policy()
|
||||
let policy = runtime.file_policy()
|
||||
let next = FileSinkPolicy::new(
|
||||
append=policy.append,
|
||||
auto_flush=false,
|
||||
|
||||
@@ -52,7 +52,7 @@ In this example, availability, policy, and failure counters are captured togethe
|
||||
|
||||
When a snapshot should be serialized for logs or support output:
|
||||
```moonbit
|
||||
println(stringify_file_sink_state(logger.file_state(), pretty=true))
|
||||
println(stringify_file_sink_state(runtime.file_state(), pretty=true))
|
||||
```
|
||||
|
||||
In this example, the typed snapshot becomes readable JSON without manual field assembly.
|
||||
|
||||
Reference in New Issue
Block a user