📝 align async facade builder docs

This commit is contained in:
Nanaloveyuki
2026-06-14 00:20:44 +08:00
parent 3888d39bc0
commit 77d97cef5e
4 changed files with 12 additions and 4 deletions
+1
View File
@@ -36,6 +36,7 @@ pub fn build_library_async_logger(
Detailed rules explaining key parameters and behaviors
- This API builds the general async runtime logger and then wraps it in the narrower `LibraryAsyncLogger[@bitlogger.RuntimeSink]` facade.
- The embedded `LoggerConfig` still goes through the normal synchronous config path first, so sink shape and any optional synchronous queue layer are already applied before the outer async layer is wrapped and then narrowed.
- The result keeps async lifecycle operations such as `run()` and `shutdown()` while narrowing the public shape.
- Async state helpers such as `pending_count()`, `dropped_count()`, `state()`, `wait_idle()`, and failure-status inspection remain on the underlying `AsyncLogger`, not on the returned facade itself.
- `to_async_logger()` can be used to recover the underlying full async logger.