https://prefect.io logo
#prefect-ui
Title
# prefect-ui
a

ajaleed

12/30/2022, 7:49 AM
Hi, I have noticed in my Prefect 2.4.2 installed version that • I am no longer able to view/see logs of running or even completed successful flows, over prefect cloud UI. • Please see image below which is showing "`This run did'nt generate logs`" whereas I do include logging statements in all my flow scripts. • Same goes for flow scripts that I published almost 3 months back and they used to show me logging statement in same box but now those tasks are also showing same black box with same message that is seen in image below Does anyone experience the same, for prefect version quoted at start of my message above OR can guide me here on this Logging issue over UI ? Thanks
c

Christopher Boyd

12/30/2022, 3:01 PM
Hi Ajaleed - how do you log your flows? Also, has anything else changed recently in terms of versioning - e.g. have you upgraded python versions, prefect versions, or anything else? Is there the potential of running a flow on a separate agent using a later version to see if it’s isolated to that version
a

ajaleed

01/03/2023, 3:12 PM
Thanks for the reply @Christopher Boyd, • We use python version 3.7, prefect version 2.4.2, and prefect_shell version 0.1.1 • following is an example of making use of logger() but its not showing me any logs on prefect cloud, in flow run; as I quoted in image shared before:
Copy code
from prefect import flow, task, get_run_logger
from prefect_shell import shell_run_command
from prefect.task_runners import SequentialTaskRunner

@flow(name="process_linkupcode",task_runner=SequentialTaskRunner())
def process_linkupcode():
    #print('starting...')
    shell_cmd=shell_run_command.with_options(retries=0, retry_delay_seconds=0)
    #shell_cmd(command="")
    logger = get_run_logger()
    import pandas as pd
    import pyarrow as pa
    import requests as r
    from datetime import datetime as dt
    from datetime import date

    <http://logger.info|logger.info>('Performing requests...')
    print('Performing requests...')

    <http://logger.info|logger.info>('Processing results in dataframe.')
    print('Processing results in dataframe.')

    <http://logger.info|logger.info>('Writing batch to file per day.')
    print('Writing batch to file per day.')
    <http://logger.info|logger.info>('Done.')
    print('Done.')
Thanks CC @User
Input from anyone is appreciated here, on this logging issue that I face in prefect; even tried on version 2.7 ? ++ @Christopher Boyd Cc @Andrew Richards