mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-05-30 15:42:25 +00:00
✨ Add file policy JSON export helpers
This commit is contained in:
@@ -243,6 +243,7 @@ match logger.file_runtime_state() {
|
||||
- `ConfiguredLogger` also exposes `file_set_policy(...)` for applying a bundled runtime file policy through the config-built control surface.
|
||||
- `ConfiguredLogger` also exposes `file_reset_failure_counters()` for clearing file failure counters through the config-built control surface.
|
||||
- `ConfiguredLogger` also exposes `file_reset_policy()` for restoring runtime file policy back to the initial config values.
|
||||
- `file_sink_policy_to_json(...)` and `stringify_file_sink_policy(...)` can export standalone file-policy snapshots directly as JSON for policy diffing, diagnostics, or reporting.
|
||||
- `file_sink_state_to_json(...)`, `stringify_file_sink_state(...)`, `runtime_file_state_to_json(...)`, and `stringify_runtime_file_state(...)` can export file and queued-file snapshots directly as JSON for diagnostics or reporting.
|
||||
- `sink.text_formatter.template` currently supports fixed tokens: `{timestamp}`, `{timestamp_ms}`, `{level}`, `{target}`, `{message}`, and `{fields}`.
|
||||
- Config-driven sink assembly currently supports `console`, `json_console`, `text_console`, and `file`.
|
||||
|
||||
@@ -47,6 +47,7 @@ version 0.3.0
|
||||
- feat: add `policy()` / `default_policy()` and configured-logger forwarding helpers so current runtime file policy and original defaults can be read explicitly
|
||||
- feat: add `set_policy()` / `file_set_policy()` so bundled append, auto-flush, and rotation policy can be applied in one runtime operation
|
||||
- feat: add `policy_matches_default()` / `file_policy_matches_default()` so runtime file policy drift can be checked explicitly
|
||||
- feat: add `file_sink_policy_to_json(...)` and `stringify_file_sink_policy(...)` so standalone file-policy snapshots can be exported directly as JSON
|
||||
- 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
|
||||
|
||||
@@ -67,6 +68,7 @@ version 0.3.0
|
||||
- test: cover path and auto-flush introspection for direct and config-built file sinks
|
||||
- test: cover rotation introspection for direct and config-built file sinks with and without configured rotation
|
||||
- test: cover runtime auto-flush and rotation policy mutation for direct and config-built file sinks
|
||||
- test: cover standalone file-policy JSON export helpers with and without rotation
|
||||
- test: cover append-policy setter behavior and confirm subsequent reopen calls inherit the updated append mode
|
||||
- test: cover split sink predicate routing and level-based routing behavior
|
||||
- test: cover `bind(...)` context composition and `fields(...)` helper behavior
|
||||
@@ -89,6 +91,7 @@ version 0.3.0
|
||||
- docs: document file path and auto-flush introspection helpers
|
||||
- docs: document rotation introspection helpers for direct and config-built file sinks
|
||||
- docs: document runtime file-policy setter helpers for direct and config-built file sinks
|
||||
- docs: document standalone file-policy JSON export helpers alongside file state snapshot exports
|
||||
- docs: clarify explicit append-policy setter semantics for direct and config-built file sinks
|
||||
- docs: add split sink examples for level-based routing
|
||||
- docs: add `bind(...)` examples for reusable context binding
|
||||
|
||||
Reference in New Issue
Block a user