Duncan08/18/2022, 1:00 PM
) in an exception case, and as such I’d like to disable dagster’s logging as it makes a mess of the test’s logging output. However, calling
before the test does not seem to work - checking the logger after the test shows that it’s been force-reset in the interim. How can one actually disable the logging for the duration of a text execution?
sandy08/18/2022, 3:43 PM
owen08/18/2022, 4:39 PM
, just not
import logging from dagster import op, get_dagster_logger, build_op_context @op def foo(context): get_dagster_logger().debug("hi") return 1 def test_foo(): dagster_logger = logging.getLogger("dagster.builtin") dagster_logger.setLevel("ERROR") foo(build_op_context()) assert False
Duncan08/19/2022, 10:12 AM