mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-05-30 15:42:25 +00:00
✨ Add file path and auto-flush introspection
This commit is contained in:
@@ -223,7 +223,8 @@ if native_files_supported() {
|
||||
- `sink.rotation` 当前支持 `max_bytes` 与 `max_backups`,提供基础 size-based rotation 和 backup retention
|
||||
- `file_sink(...)` 还提供 `reopen()`、`open_failures()`、`write_failures()`、`flush_failures()`、`rotation_failures()`,用于基础可观测性
|
||||
- `file_sink(...)` 当前还提供 `append_mode()`;`reopen(append=...)` 在显式传值时会更新后续 reopen 使用的 append 策略
|
||||
- `build_logger(...)` 产出的 `ConfiguredLogger` 同样提供 `file_reopen()`、`file_flush()`、`file_close()`、`file_append_mode()` 与对应 file failure 计数访问器,便于配置式接入后继续运维控制
|
||||
- `file_sink(...)` 也可直接读取 `path()` 与 `auto_flush_enabled()` 等基础 file 策略状态
|
||||
- `build_logger(...)` 产出的 `ConfiguredLogger` 同样提供 `file_reopen()`、`file_flush()`、`file_close()`、`file_append_mode()`、`file_path()`、`file_auto_flush()` 与对应 file failure 计数访问器,便于配置式接入后继续运维控制
|
||||
- `sink.text_formatter.template` 当前支持固定 token:`{timestamp}`、`{timestamp_ms}`、`{level}`、`{target}`、`{message}`、`{fields}`
|
||||
- 当前可由配置直接组装的 sink 类型:`console`、`json_console`、`text_console`、`file`
|
||||
- `queue` 会作为显式包装层附着在最终 sink 外侧;这仍然是同步 drain 模型,不是 async runtime
|
||||
|
||||
Reference in New Issue
Block a user