mikemalinowski/qute

Minor: logging.getLogger may need to ensure there is a rootLogger beforehand.

Opened this issue · 2 comments

log = logging.getLogger('qute')

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.

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 ;) )