<@ULVA73B9P> I set the prefect configuration to al...
# ask-marvin
y
@Marvin I set the prefect configuration to allow for rich markup logging. When I execute my flow by doing
python myflow.py
in the console I can see the properly formatted logging but in the Prefect Cloud UI my logs don't have Rich Markup formatting. Can you explain if I am missing a step in setting this up
m
It appears that you've done the necessary step to enable Rich markup for logging by setting
PREFECT_LOGGING_MARKUP=True
. However, Rich markup in logs is something that affects console output and may not translate directly to the Prefect Cloud UI. The Prefect Cloud UI may not render Rich markup since the rendering of logs within the UI is dependent on how Prefect Cloud processes and displays log data. To use Rich's markup in your logs, you've configured the
PREFECT_LOGGING_MARKUP
as shown below:
Copy code
python
from prefect import flow, get_run_logger

@flow
def my_flow():
    logger = get_run_logger()
    <http://logger.info|logger.info>("This is [bold red]fancy[/]")
According to the Prefect Logs documentation, there is no specific mention of additional steps required to view Rich markup in the Prefect Cloud UI. It's possible that the feature might have limitations or isn't fully supported in the UI. You may want to adjust your expectations regarding how logs appear in the Prefect Cloud compared to your console. You can find more information about logging and how to configure it in Prefect Cloud in the official documentation here. If you need further assistance or clarification, you might consider reaching out to Prefect's support or checking GitHub issues to see if there are related reports or feature requests regarding Rich formatting in the Prefect Cloud UI.