Clear Log action
Clear Log action
I suggest an action to clear the log for a task (default to current task). It could be a new action in the "RoboTask Commands" section. Or it could be in the Settings tab of the task.
Re: Clear Log action
Sorry, I am just curious, why right-clicking on the log panel and selecting 'Clear Log' is not enough?
Re: Clear Log action
An example might be a trigger that records the size of a new window into the log. The log would get very long very quickly. Or, as you say, you'd need to open RoboTask all the time, find the task, and right-click to clear the log so that only the most recent window info shows in the log. If there was the ability to clear the log programmatically, you could just clear the log as a task step just before outputting the info to the log. (That's actually my use case for the feature request.)
Re: Clear Log action
True. But that setting applies to all tasks. And there's no way to know how many characters your task will dump to the log.
It would be nice if the log contained ONLY the log output from the last triggered event. IMHO.
As always, Oleg, thank you for your consideration.
It would be nice if the log contained ONLY the log output from the last triggered event. IMHO.
As always, Oleg, thank you for your consideration.
Re: Clear Log action
I agree with this suggestion. It would be a nice option to clear the log before running a task.
I've been a subscriber for many years and I use RoboTask daily. RoboTask is an EXCELLENT program and gets better with every new feature!
I've been a subscriber for many years and I use RoboTask daily. RoboTask is an EXCELLENT program and gets better with every new feature!
Re: Clear Log action
I already did a similar thing by creating my own task where it goes into the log file of the defined task and scans the list of lines by older dates
but it does not update in the panel view, you need to restart the program to load the updated log again
but it does not update in the panel view, you need to restart the program to load the updated log again
Re: Clear Log action
Any chance you would share this task, it sound better than clearing the whole log.
Windows 11 Pro, RoboTask v10.0.2
Re: Clear Log action
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1864609949
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DisableOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task39"
Hide=INTEGER|0
ID=INTEGER|717804897
LogOnAsUser=INTEGER|1
Name=STRING|"clear_log"
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
StepPause=INTEGER|0
ToLog=INTEGER|1
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
[Actions\Action1]
ActionID=STRING|"A_LOOP_TEXT"
Enabled=INTEGER|-1
Name=STRING|"list Name Tasks"
Params=FOLDER
[Actions\Action1\Params]
_rt_variables_produced=STRING|"current_task"
delimiter_no=STRING|"0"
destvar=STRING|"current_task"
line0=STRING|"nameTask"
linecount=STRING|"1"
quote_char=STRING|"0"
sourcetext=STRING|"1"
strict_delim=STRING|"1"
[Actions\Action2]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action2\Params]
case=STRING|"0"
connection=STRING|"0"
count=STRING|"1"
operator=STRING|"8"
type=STRING|"0"
value1=STRING|"{GetTaskIdByExtName({current_task})}"
[Actions\Action3]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER
[Actions\Action3\Params]
message=STRING|"taskname: {current_task} - taskID: {GetTaskIdByExtName({current_task})} - logFile: {TaskLogFileById({GetTaskIdByExtName({current_task})})}"
type=STRING|"3"
[Actions\Action4]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"overwrite log file"
Params=FOLDER
[Actions\Action4\Params]
encode=STRING|"0"
fileexists=STRING|"0"
filname=STRING|"{LogFolder}\{TaskLogFileById({GetTaskIdByExtName({current_task})})}"
linecount=STRING|"0"
suppress=STRING|"0"
withoutprefix=STRING|"0"
[Actions\Action5]
ActionID=STRING|"A_FLOW_ELSE"
Enabled=INTEGER|-1
Name=STRING|"Else"
[Actions\Action6]
ActionID=STRING|"A_ROBOTASK_LOG"
Enabled=INTEGER|-1
Name=STRING|"Log Message"
Params=FOLDER
[Actions\Action6\Params]
message=STRING|"taskname: {current_task} - error"
type=STRING|"2"
[Actions\Action7]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Actions\Action8]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
Re: Clear Log action
I didn't add "Restart Robotask"
It is up to you when this will be done.
It is up to you when this will be done.