jlaurent
02/16/2023, 10:28 AMloggers_by_deployment_name = {
"deploy": {"prod_logger": prod_logger},
"local": {"console_logger": colored_console_logger},
}
env_config = dotenv_values(".env")
deployment_name = env_config["DAGSTER_DEPLOYMENT"]
active_logger = loggers_by_deployment_name[deployment_name]
defs = Definitions(assets=[some_asset], loggers=active_logger)
I need to configure my prod_logger
. I have created a YAML config file, but I don't know how to provide it. I've read the documentation several time and I only saw the possibility to pass a config from the command line to a job, or from the dagit launchpad to a job.owen
02/17/2023, 12:14 AM.configured
, i.e.
loggers_by_deployment_name = {
"deploy": {"prod_logger": prod_logger.configured(my_config_dictionary)},
"local": {"console_logger": colored_console_logger},
}
this requires that you have your config loaded as a dictionary, which you can do with
with open('my_config.yml', 'r') as file
my_config_dictionary = yaml.safe_load(file)