📝 consolidate logger API and async lifecycle guidance

This commit is contained in:
Nanaloveyuki
2026-06-14 14:00:00 +08:00
parent 4f2ad097af
commit 265cd69ea9
154 changed files with 2419 additions and 396 deletions
+8
View File
@@ -35,6 +35,8 @@ Detailed rules explaining key parameters and behaviors
- The output includes `kind`, `path`, `append`, `auto_flush`, and `text_formatter`.
- `rotation` is only included when present.
- `kind` is serialized using the stable parser-facing sink labels such as `console`, `json_console`, `text_console`, and `file`.
- `text_formatter` export is delegated to `text_formatter_config_to_json(...)`, so nested formatter settings follow the same config schema used elsewhere.
- The exported shape is schema-oriented and shared by larger config export helpers.
- This helper is especially useful when building larger config payloads manually.
@@ -67,3 +69,9 @@ e.g.:
- If file-related fields are unused by the sink kind, they are still exported according to the stable config shape.
### Notes
1. Use this helper when you need a reusable JSON value rather than a final JSON string.
2. `logger_config_to_json(...)` reuses this helper for the nested `sink` field.