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

nq8tc3y6

08/17/2023, 12:17 PM
Hello there ! I want to disable all debug logs (context.debug.log()) in my production environement. In the following minimal example, if I run the job using
dagster job execute -f my_dagster_project/__init__.py -j demo_job
, I don't see the debug log. But when I launch this job using Dagit UI, I see it.
Copy code
from dagster import Definitions, asset, RunConfig, define_asset_job


@asset
def hello_logs(context):
    context.log.debug("Hello, debug!")


default_config = RunConfig(
    loggers={"console": {"config": {"log_level": "INFO"}}}
)


demo_job = define_asset_job(
    name="demo_job",
    selection=[hello_logs],
    config=default_config,
)


defs = Definitions(
    assets=[hello_logs],
    jobs=[demo_job],
)
Is it a normal comportement? Is there a way to disable these debug logs for my production environment?
🤖 1
s

sean

08/18/2023, 3:28 PM
Zach’s suggestion is good, you should set
python_log_level
to an appropriate log level in your instance config.
n

nq8tc3y6

08/22/2023, 12:25 PM
Yes I've see that but I was looking for a non experimental feature.