Limit logging config to CLI #5274
Labels
in-progress
issue is actively being worked on
source::anaconda
created by members of Anaconda, Inc.
type::tech-debt
identifies or resolves some technical debt
Checklist
What is the idea?
Only apply logging defaults/config when conda-build's CLI entrypoints are called (e.g. the
conda_build.cli.main_*.execute
functions).Why is this needed?
Conda-build is not only a CLI application. It is also a library and downstream applications import from it and use the API. This means we should not be setting any logging defaults or otherwise customizing the logging and rather defer to the downstream applications and allow them to control logging as they see fit.
Efforts are already underway to improve conda's logging with much of the same mindset (see conda/conda#13541, conda/conda#13735, and conda/conda#13732).
While working on this we need to beware prior art, e.g., #2106.
What should happen?
Remove logging customization that occurs upon import:
conda-build/conda_build/cli/main_convert.py
Line 16 in 6982cbd
conda-build/conda_build/utils.py
Lines 1661 to 1667 in 6982cbd
Only "initialize" logging when conda-build CLI entrypoints are invoked.
Additional Context
No response
The text was updated successfully, but these errors were encountered: