mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-07-24 00:42:18 +00:00
📝 align async text facade docs
This commit is contained in:
@@ -32,6 +32,7 @@ Detailed rules explaining key parameters and behaviors
|
||||
- This alias does not introduce a new runtime type or wrapper layer.
|
||||
- It preserves the same async lifecycle helpers as other async logger aliases.
|
||||
- Because this is only an alias, methods that are async on `AsyncLogger[@bitlogger.FormattedConsoleSink]` remain async here as well.
|
||||
- The alias therefore keeps the same text-console-specific builder and lifecycle semantics already documented on `AsyncLogger[@bitlogger.FormattedConsoleSink]`, including the concrete sink shape and runtime-dependent close/failure behavior.
|
||||
- The alias exists to give application code a clearer public name when it wants the concrete text-console sink shape explicitly.
|
||||
- `build_application_text_async_logger(...)` returns this alias.
|
||||
|
||||
@@ -73,3 +74,5 @@ e.g.:
|
||||
1. This alias is about naming and public intent, not a different async implementation.
|
||||
|
||||
2. Use `build_application_text_async_logger(...)` when callers want the `FormattedConsoleSink`-backed async type explicitly.
|
||||
|
||||
3. Use `ApplicationAsyncLogger` when application code should keep the broader runtime-sink shape instead of the text-console-specific one.
|
||||
|
||||
@@ -41,6 +41,7 @@ Detailed rules explaining key parameters and behaviors
|
||||
- Unlike `build_application_async_logger(...)`, this facade does not go through the full synchronous configured-logger build path first.
|
||||
- It uses the selected text-oriented `LoggerConfig` fields directly and therefore does not apply `LoggerConfig.queue` or preserve sync runtime sink controls.
|
||||
- The returned logger keeps the usual async lifecycle helpers.
|
||||
- Because it returns the direct `ApplicationTextAsyncLogger` alias, the resulting logger also keeps the same runtime-dependent close/failure semantics as the underlying `AsyncLogger[@bitlogger.FormattedConsoleSink]`.
|
||||
|
||||
### How to Use
|
||||
|
||||
@@ -72,3 +73,5 @@ e.g.:
|
||||
1. This is a narrower text-console async facade than `build_application_async_logger(...)`.
|
||||
|
||||
2. It is most useful when callers want the `FormattedConsoleSink`-backed async type explicitly.
|
||||
|
||||
3. Use `build_application_async_logger(...)` instead when callers need the broader runtime-sink build path, including sync queue application through `build_logger(config.logger)`.
|
||||
|
||||
Reference in New Issue
Block a user