Question
· Aug 2, 2022

Log of an individual run of task

Hi,

 

Is there a way to access the logs of a specific run of a task from the management portal task manager? I'd like to retrieve the output of a given run without going into the entire task history in an output file.

 

Thank you!

Discussion (7)1
Log in or sign up to continue

First, I think that the "Output file" which the Task Manager provides is just overwritten each time the Task runs (haven't verified this, but that's how I read the code). So there really is no history of the Task logs AFAIK. In any case, the Task Manager does not support any sort versioning or history of this output file.

My best suggestion is that you add a "Log Directory" Property to the Task definition, and then the OnTask() method can use that to manage output from the running Task. Perhaps a separate directory for each scheduled Task, and a date/time stamp as part of the file name? This does not give you any direct tie in or access from the Portal, but it should be pretty easy to identify the log for any given run.