Duplicate logs in UI

I just upgraded from prefect 2.6 to 2.12.1 and am having an issue with logging. I would like INFO level logs from libraries that are used in Flows to appear in the UI. Previously, I was able to change the logging.yml to what’s below to achieve this.

# The root logger: any logger without propagation disabled sends to here as well
    # By default, we display warning level logs from any library in the console
    # to match Python's default behavior while formatting logs nicely
    level: INFO
    handlers: [orion,console]

After the update though, if I change the handler to “api” from “orion”, then I do see the INFO level logs as expected, but now all of the Prefect generated logs (“Created Task Run”, “Executing”, etc.) and anything logged in the Flow with get_run_logger() are all appearing in the UI twice.

Any suggestions or is there a better way to see the underlying INFO logs?

1 Like

I am facing a somewhat similar problem. I am using a customized logger with Prefect 2.10.21, and all the logs of the non-prefect functions and classes are being displayed twice in the UI.
The configuration of my logger is as follows:

logger = logging.getLogger(name="StreamLogger")
ch = logging.StreamHandler()
# Avoid messages propagating to the root logger
 logger.propagate = False

Does anyone know how to solve this issue by any chance?