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

Arnas Ambrasas

01/25/2023, 9:52 AM
Hello, could someone explain how to use
loggers
parameter of
Definitions
class or
default_logger_defs
parameter of
repository
? Cant seem to understand if this is a bug or I’m using it incorrectly. I’ve constructed my definition:
Copy code
from dagster import json_console_logger, Definitions
...
defs = Definitions(
    loggers={'json_logger': json_console_logger},
    jobs=[single_pod_job],
)
Logger appears as a resource in job overview, but I cannot use launching a job. If I provide logger definitions directly to job definition, everything is fine - no errors in launchpad:
Copy code
single_pod_job = example_graph.to_job(
    name="single_pod_job",
    logger_defs={'json_logger': json_console_logger},
    config=config_from_files(
        [
            file_relative_path(__file__, os.path.join("..", "run_config", "pipeline.yaml")),
        ]
    ),
)