liesel-devs / liesel

A probabilistic programming framework
https://liesel-project.org
MIT License
38 stars 2 forks source link

Update logging setup #187

Closed jobrachem closed 3 months ago

jobrachem commented 3 months ago

Small update to make the liesel default logger behave more like you would expect.

Now, you can simply update the logging level like this:

import logging

logger = logging.getLogger("liesel")
logger.setLevel(logging.DEBUG)

Before, our setup required that you changed the level on the handler, which is less obvious:

import logging

logger = logging.getLogger("liesel")
logger.handlers[0].setLevel(logging.DEBUG)
jobrachem commented 3 months ago

@GianmarcoCallegher would you do the review?

GianmarcoCallegher commented 3 months ago

Looks good ❤️