papermill icon indicating copy to clipboard operation
papermill copied to clipboard

add CLI's log_level parameter to execute_notebook function

Open djchou opened this issue 6 years ago • 1 comments

Please add log_level as a parameter to the execute_notebook function so that logging can be customized at runtime.

djchou avatar Dec 11 '19 18:12 djchou

You can control this by setting the logging basic config: logging.basicConfig(level=log_level, format="%(message)s"), or by setting papermill or nbconvert's logger specifically at runtime. The reason we only set the basic config in the CLI option is because we can't know if we're messing with a parent logging configuration inside execute_notebook. Whereas in the CLI we know we're the entrypoint for the python process and no parent logging configs are set.

MSeal avatar Dec 30 '19 02:12 MSeal