Open ldunham1 opened 4 years ago
That sounds like a very good idea - do you have an implementation example at all?
logging.basicConfig(level=logging.INFO)
log = logging.getLogger('qute')
Is all you need :) basicConfig does all the heavy lifting (if you can call it heavy ;) )
https://github.com/mikemalinowski/qute/blob/3c5e1c34eba7153ba564910963f5c48c7abd1b4c/qute/constants.py#L9
It might be safer to ensure there is a root logger available. If there isnt byt this point, I dont think the log object will output.
Might be worth double checking if you need to call
logging.basicConfig(level=logging.INFO)
beforehand, perhaps ideally with your preferred log level. Its not used if a root logger already exists, so there shouldnt be a downside.