jrmcgaha-dev / pydnd

Flexible Dungeons and Dragons entity manager and helper
MIT License
1 stars 0 forks source link

Make logging unified #3

Open jrmcgaha-dev opened 4 years ago

jrmcgaha-dev commented 4 years ago

Letting each individual module have its own logger makes actually turning all of them off a bear. Easiest solution would probably be to just have one unified logger gets passed around within the package so that the entire thing can be enabled, disabled, and/or customized all at once.

jrmcgaha-dev commented 4 years ago

Moved logging configuration to __init__ so that the settings propagate through the rest of the package. I decided to keep each module grabbing its own logger based on __name__ so that loggers can be disabled at either the package level (change init level to desired higher level) or at the module level (module._log.setLevel(desired_level)).

jrmcgaha-dev commented 4 years ago

Secondary option is changing the formatting so that the root logger can just quietly handle everything. I'm currently more inclined to have separate loggers that share settings rather than having one true unified logger, but I will keep this issue open as a reminder to give this option more thought.