Sean Talia

    Sean Talia

    1 year ago
    has anyone ever had an issue with using a logger from a custom module, whereby the custom module's logs are being appropriately by agent's flow logs, but those logs seemingly do not get forwarded to your server? I do have in my config.toml:
    [logging]
    # Extra loggers for Prefect log configuration
    extra_loggers = "['custom_module']"
    # Send logs to Prefect Cloud
    log_to_cloud = true
    actually I solved my own issue, please ignore 😎
    a

    Alex Cano

    1 year ago
    Was the issue stemming from the
    config.toml
    entry? Would love to have a solution in the thread for others reading! 🙂
    Sean Talia

    Sean Talia

    1 year ago
    it was in a way – my situation is perhaps a little unique but what was happening was, I'm using a DockerRun run config, and the above
    config.toml
    was built into the image; when I spun up my Agent on my laptop to be able to run the flow, I actually was passing in as a volume (using the agent's
    --flow
    param) a different
    config.toml
    that had some secret values that my flow needs, and this was overwriting the above
    config.toml
    and actually, the above
    config.toml
    is a bit of overkill; really, I need two separate
    config.toml
    's – one that will get mounted into my DockerRun container, which my flow will use for its configuration at runtime, and another that's used by the agent;
    this block:
    [logging]
    # Extra loggers for Prefect log configuration
    extra_loggers = "['custom_module']"
    needs to go into RunConfig image's
    ~/.prefect/config.toml
    , while the
    # Send logs to Prefect Cloud
    log_to_cloud = true
    needs to go into the
    config.toml
    that my agent consumes (
    ~/.prefect/config.toml
    on my local host)