https://dagster.io/ logo
#ask-community
Title
# ask-community
s

Steven Murphy

07/20/2023, 2:26 PM
Hi folks, I have code for a job which I've abstracted out to a module, and I'm building unit tests against it to test in isolation. I've noticed that when I run these tests, I don't see any of the logger messages appear in my terminal. If I run
my_job.execute_in_process
they appear fine. Is there a means of getting the messages to appear without firing up the Dagster machinery?
Copy code
from dagster import get_dagster_logger, job, op

logger = get_dagster_logger()


def my_test_method():
    <http://logger.info|logger.info>("in my_test_method")
    return 1


@op
def op_one():
    my_test_method()


@job
def my_job():
    op_one()


if __name__ == "__main__":
    my_job.execute_in_process()
    my_test_method()