📝 clarify async config docs

This commit is contained in:
Nanaloveyuki
2026-06-14 00:32:05 +08:00
parent f19e9649af
commit 7207c07cbf
5 changed files with 60 additions and 16 deletions
+9 -2
View File
@@ -2,8 +2,8 @@
name: stringify-async-logger-config
group: api
category: async
update-time: 20260512
description: Serialize AsyncLoggerConfig into compact or pretty JSON text for export and diagnostics.
update-time: 20260614
description: Serialize AsyncLoggerConfig into compact or pretty JSON text for export and diagnostics using the canonical async policy labels.
key-word:
- async
- config
@@ -38,6 +38,7 @@ Detailed rules explaining key parameters and behaviors
- `pretty=true` returns indented JSON for humans.
- This helper is built on top of `async_logger_config_to_json(...)`.
- The exported text follows the supported async config schema rather than internal queue implementation details.
- Canonical policy labels such as `DropNewest` and `Never` are emitted even though the parser also accepts aliases like `DropLatest` and `None`.
### How to Use
@@ -70,3 +71,9 @@ e.g.:
- If invalid constructor inputs were normalized earlier, the resulting text contains the normalized config values.
### Notes
1. Use this helper when async policy should be copied or logged as text directly.
2. If negative `max_pending` semantics matter, remember that the serialized text preserves the config value while runtime queue creation later clamps the queue limit to `0`.