PyPSA / powerplantmatching

Set of tools to combine multiple power plant databases
https://powerplantmatching.readthedocs.io/en/latest/
GNU General Public License v3.0
157 stars 54 forks source link

Configuration of logging prevented through `logging.basicConfig(...)` #134

Closed euronion closed 3 months ago

euronion commented 1 year ago

PPM uses logging.basicConfig(...) here:

https://github.com/PyPSA/powerplantmatching/blob/afe45608439b4b8ba2f731d23051b6f90627b733/powerplantmatching/core.py#L59

Since basicConfig(...) should only be called by the main thread/application and is idempotent, any script/module importing powerplantmatching cannot use basicConfig(...) to configure its logger, unless the logger configuration is done before importing PPM.

-> this should be removed