Add config JSON export helpers

This commit is contained in:
Nanaloveyuki
2026-05-10 13:44:59 +08:00
parent 4b258209e6
commit 8b49719816
6 changed files with 76 additions and 3 deletions
+3
View File
@@ -11,6 +11,7 @@ version 0.3.0
- feat: add `TextFormatterConfig::to_formatter()` for bridging parsed config into runtime formatter setup
- feat: add `parse_logger_config_text(...)` for JSON config parsing
- feat: add `logger_config_to_json(...)` and `stringify_logger_config(...)` for config serialization
- feat: add standalone JSON export helpers for `QueueConfig`, `TextFormatterConfig`, and `SinkConfig`
- feat: add `RuntimeSink`, `ConfiguredLogger`, `build_logger(...)`, and `parse_and_build_logger(...)` for config-driven logger assembly
- feat: add `ConfiguredLogger::drain(...)`, `ConfiguredLogger::pending_count()`, and `ConfiguredLogger::dropped_count()` queue observability helpers
- feat: add `bitlogger_async/` as a separate native-target async adapter package
@@ -56,6 +57,7 @@ version 0.3.0
- test: cover parsing of core logger config fields
- test: cover nested formatter and queue config parsing
- test: cover config stringify and parse roundtrip behavior
- test: cover stable JSON export for reusable config subtypes
- test: cover config-built queued text logger flushing and pending count behavior
- test: cover partial drain behavior for config-built queued logger
- test: cover dropped-count reporting for bounded config-built queue
@@ -82,6 +84,7 @@ version 0.3.0
- docs: add `examples/async_basic` to show async worker startup and queue-backed logging flow
- docs: update `examples/async_basic` to use unified JSON-driven async logger config
- docs: update root README, English README, and Mooncake README with config usage notes
- docs: document standalone JSON export helpers for reusable config subtypes
- docs: update formatter examples to demonstrate template-based text rendering
- docs: update file sink examples to demonstrate rotation and backup retention
- docs: document file sink reopen and observability counters in README variants