Explicit initialization of logging#
Explicit initialization of logging
|
status: proposed
|
||||
Provide a library for explicit initialization of logging. Context: Currently there are multiple approaches to logging initialization. Rust frontend configuration is provided as code and requires explicit initialization before any logging starts. C++ configuration is lazily loaded on first use and based on a JSON file with path provided using environment variable. This approach discrepancy makes it difficult to manage logging in multi-language environment. Issue can be solved by providing an explicit initialization library. Such explicit logging initialization shall:
Examples of use:
Consequences Such change will require design changes to middleware logging. In Rust it is a common practice to explicitly initialize logging before any logging starts. This is true to both score_log logging frontend and ubiquitous log crate that is a defacto standard for logging in Rust. Middleware logging library is currently initialized lazily on first use, using JSON config file. It is not possible to perform the initialization operation explicitly. Justification for the Decision Explicit logging initialization will simplify logging initialization in multi-language environments. |
|||||