ihmeuw / vivarium

A python microsimulation framework
http://www.healthdata.org
BSD 3-Clause "New" or "Revised" License
46 stars 15 forks source link

Logging in interactive settings is verbose and not configurable #283

Open collijk opened 1 year ago

collijk commented 1 year ago

Working in a notebook or REPL with vivarium simulations is pretty unpleasant. The logging level is set to DEBUG by default, which throws a bunch of not very helpful information at the user. It's also not configurable in any way. After tackling https://github.com/ihmeuw/vivarium/issues/282, the next thing to do should be to allow user level configuration of the logging and change the default level in the interactive setting to be much less noisy.

aflaxman commented 1 year ago

Working in a notebook or REPL with vivarium simulations is pretty unpleasant. The logging level is set to DEBUG by default, which throws a bunch of not very helpful information at the user. It's also not configurable in any way. After tackling #282, the next thing to do should be to allow user level configuration of the logging and change the default level in the interactive setting to be much less noisy.

In case it is helpful, I have been using the following code snippet to suppress DEBUG messages when I work in a notebook sometimes:

# all the debugging logs are annoying... do this to suppress them:
import vivarium.interface.utilities
vivarium.interface.utilities.configure_logging_to_terminal(verbose=False)