Two loggers co-existed until today, without much utility that @Wonshtrum and I could appreciate. We chose to harmonize logging throughout the whole codebase, and to take RUST_LOG into account anywhere we set up a logger.
This PR fixes a bug brought by commit https://github.com/sozu-proxy/sozu/commit/3a4e4fd93d5451c43f822348e933af1894a2e917, which caused the default logger to be used instead of the tuned one. That was because the commit brings a function to call a debug! macro that calls a static TAGbefore the logger is initialized, which forces the logger to instantiate with a default tag "SOZU" and can not update it.
The bug is fixed by rearranging the code to prevent the early logging, and with a warning comment. The best would be to add a panic! in the code if some developer were to call a logging macro before a Logger is initialized.
Two loggers co-existed until today, without much utility that @Wonshtrum and I could appreciate. We chose to harmonize logging throughout the whole codebase, and to take
RUST_LOG
into account anywhere we set up a logger.This PR fixes a bug brought by commit https://github.com/sozu-proxy/sozu/commit/3a4e4fd93d5451c43f822348e933af1894a2e917, which caused the default logger to be used instead of the tuned one. That was because the commit brings a function to call a
debug!
macro that calls a staticTAG
before the logger is initialized, which forces the logger to instantiate with a default tag "SOZU" and can not update it. The bug is fixed by rearranging the code to prevent the early logging, and with a warning comment. The best would be to add apanic!
in the code if some developer were to call a logging macro before a Logger is initialized.