Thread
#prefect-server
    Lana Dann

    Lana Dann

    6 months ago
    i have tasks that call operators/connectors that i’ve defined with their own loggers. but even when i set
    log_stdout=True
    those logs don’t show. any advice on how to include logs from those other loggers?
    Kevin Kho

    Kevin Kho

    6 months ago
    Have you seen the page on extra loggers ? Are you on DaskExecutor?
    Lana Dann

    Lana Dann

    6 months ago
    nah i’m not using a dask executor. right now i have something like this:
    import logging
    import logging.config
    
    logging.config.fileConfig("logging.conf")
    logger = logging.getLogger(__name__)
    
    class SnowflakeConnector:
    and then in my task i’ll do something like
    from connectors.snowflake import SnowflakeConnector
    
    @task
    def my_task():
        s = SnowflakeConnector()
        s.some_method()
    so that means for every new logger i initiate with a new name, i need to add the name to the
    extra_loggers
    section of the config?
    Kevin Kho

    Kevin Kho

    6 months ago
    I would recommend passing it as a list in the RunConfig as an environment variable honestly if you can do that, but I think the answer to your question is yes