clawpack/pyclaw — pull request #382 by ketch (2014-03-19 06:54:52+00:00)
Title: General update to logging.

Make all loggers inherit from pyclaw logger.
Add convenience function for setting console logging level in controller (h/t @ahmadia).

I see two main use cases where one wants to adjust the logging:

1. Turn off logging to stdout (IPython notebooks)
2. Turn off all logging (or set all to CRITICAL) (Shaheen)

For 1, we want to selectively modify the level of the console handler for the controller logger. This can now be done via

claw.verbosity = 0

Meanwhile, the controller will still write to the log file.

For #2, one can do

import logging
logger = logging.getLogger()
logger.setLevel(logging.CRITICAL)

which propagates to the other loggers.