mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-07-24 00:42:18 +00:00
📝 clarify async config type docs
This commit is contained in:
@@ -31,6 +31,7 @@ Detailed rules explaining key parameters and behaviors
|
||||
|
||||
- This is a type alias, not a built logger instance.
|
||||
- The current fields are `logger : LoggerConfig` and `async_config : AsyncLoggerConfig`.
|
||||
- The public `src-async` surface forwards this alias directly from `@utils.AsyncLoggerBuildConfig`, so constructor, parser, export, and stringify helpers all operate on one shared underlying build-config model.
|
||||
- `AsyncLoggerBuildConfig::new(...)` constructs this type as the main handoff object for async build flows.
|
||||
- `build_async_logger(...)`, `build_async_text_logger(...)`, `parse_async_logger_build_config_text(...)`, `async_logger_build_config_to_json(...)`, and `stringify_async_logger_build_config(...)` all consume or produce this same public shape.
|
||||
- `build_async_logger(...)` consumes the full sync build path by calling `build_logger(config.logger)` first, so `LoggerConfig.sink`, `LoggerConfig.queue`, and the resulting runtime sink behavior all participate before the async layer is added.
|
||||
|
||||
@@ -31,6 +31,7 @@ Detailed rules explaining key parameters and behaviors
|
||||
|
||||
- This is a type alias, not a runtime logger handle.
|
||||
- The current fields are `max_pending : Int`, `overflow : AsyncOverflowPolicy`, `max_batch : Int`, `linger_ms : Int`, and `flush : AsyncFlushPolicy`.
|
||||
- The public `src-async` surface forwards this alias directly from `@utils.AsyncLoggerConfig`, so constructor, parser, export, and stringify helpers all operate on one shared underlying config model.
|
||||
- `AsyncLoggerConfig::new(...)` normalizes `max_batch` and `linger_ms`, but it preserves the provided `max_pending` value.
|
||||
- Runtime queue creation later interprets negative `max_pending` as `0` when choosing the internal queue kind.
|
||||
- `parse_async_logger_config_text(...)`, `async_logger_config_to_json(...)`, and `stringify_async_logger_config(...)` all operate on this same public config shape.
|
||||
|
||||
Reference in New Issue
Block a user