02-28-2024 02:40 PM
I have a couple of workflows that take time to run (one is about a minute, the other is a few minutes). Is there some way I can have an update showing on the screen to say it still running? Both of these workflows traverse all the switches, so switch IP's would be one possibility.
Thanks.
Solved! Go to Solution.
02-29-2024 08:33 AM
use the Workflow Dashboard, please. You will be able to see if a workflow is running or witch which results in they ended. But you will not see any activity details during runtime.
03-02-2024 12:59 AM
I forgot to mention that you can use the Python log facility to write to STDOUT and a file. This gives you several good opportunities. in regard to real-time log inspection (tailing the file) and enabling or disabling debug logs as required.
Below a code example.
import logging
logFile = '/tmp/'+ emc_vars['workflowName'].replace(' ', '_') +'_'+ time.strftime("%Y-%m-%d_%H-%M-%S") +'.log'
log = None
########################################################################
def setupLogger():
global log
log = logging.getLogger()
log.setLevel( logging.DEBUG )
screen = logging.StreamHandler()
screen.setLevel( logging.INFO )
screen_formatter = logging.Formatter('%(asctime)s.%(msecs)03d %(levelname)-7s %(message)s', datefmt='%H:%M:%S')
screen.setFormatter( screen_formatter )
log.addHandler( screen )
if emc_vars['DEBUG'].lower() == 'true':
log.info("write LOG file " + logFile)
file = logging.FileHandler(logFile, mode='a', encoding='utf-8')
file.setLevel( logging.DEBUG )
formatter = logging.Formatter('%(asctime)s %(levelname)-7s [%(filename)s:%(lineno)d] %(message)s')
file.setFormatter( formatter )
log.addHandler( file )
########################################################################
def main():
setupLogger()
log.info("Hello World!")
########################################################################
main()
03-05-2024 07:09 AM
Thanks. I'll look into this as well.
02-29-2024 08:33 AM
use the Workflow Dashboard, please. You will be able to see if a workflow is running or witch which results in they ended. But you will not see any activity details during runtime.
03-01-2024 06:29 AM
Thanks for this. I was thinking this would be the solution, but hoping for better.