Ryan Sattler

    Ryan Sattler

    4 months ago
    Hi - is there a way to change the logging format when using Prefect Cloud? Setting
    PREFECT__LOGGING__FORMAT
    in the flow config env doesn’t seem to work.
    specifically I want to output the flow_run_id on each log line to make them easier to search in another system we use
    so I tried to set
    "PREFECT__LOGGING__FORMAT": "[%(asctime)s] %(levelname)s - %(flow_run_id)s - %(name)s | %(message)s",
    in the flow config env but this doesn’t seem to do anything and I think I saw somewhere that this doesn’t work with Cloud? If so is there an alternative?
    Anna Geller

    Anna Geller

    4 months ago
    Unfortunately, there is no way of displaying log format in Prefect Cloud UI 1.0 in a different way - setting this variable will change the format in how logs are collected and printed in your terminal, but the UI will still render them in the same format as it always does. If you are asking for 2.0, I would need to cross-check it, LMK