studioimaginaire / phue

A Python library for the Philips Hue system
Other
1.52k stars 267 forks source link

Log level for scoped logger set wrong #193

Open henryruhs opened 2 years ago

henryruhs commented 2 years ago

The phue logger is set fine:

logger = logging.getLogger('phue')

But then the log level is set for the logging lib and not only for the phue logger:

logging.basicConfig(level=logging.DEBUG)

From my understanding it should be the following, otherwise ALL loggers outside phue will be set:

logger.setLevel(logging.DEBUG)

TLDR: Libraries consuming phue and using an unscoped logger will (properly) be set by phue. In my case I had to give MY logger MY scope as the log level of the phue logger had been set.