mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-07-26 09:52:31 +00:00
📝 clarify configured logger alias behavior
This commit is contained in:
@@ -35,6 +35,7 @@ Detailed rules explaining key parameters and behaviors
|
||||
|
||||
- Parsing and building are done in one step by calling `parse_logger_config_text(input)` first and then passing the resulting `LoggerConfig` into `build_logger(...)`.
|
||||
- The returned `ConfiguredLogger` is just `Logger[RuntimeSink]`, so it still supports regular logging calls.
|
||||
- The returned logger also keeps inherited logger target behavior such as `with_target(...)`, `child(...)`, and per-call `target=` overrides on `log(...)`.
|
||||
- Queue wrapping and file control helpers remain available after config assembly.
|
||||
- `parse_and_build_application_logger(...)` only re-exports this same configured runtime logger result under the `ApplicationLogger` alias, while `parse_and_build_library_logger(...)` wraps the same result in `LibraryLogger[RuntimeSink]`.
|
||||
- Errors are surfaced as `ConfigError` rather than silent fallback.
|
||||
@@ -59,7 +60,7 @@ let logger = parse_and_build_logger(
|
||||
|
||||
In this example, config parsing and logger construction happen in one place.
|
||||
|
||||
And the resulting value can immediately emit logs.
|
||||
And the resulting value can immediately emit logs with the same ordinary logger target semantics as any other `Logger` value.
|
||||
|
||||
#### When Need Config-built File Or Queue Controls
|
||||
|
||||
|
||||
Reference in New Issue
Block a user