Clear Log action
Posted: Tue Mar 19, 2024 3:22 pm
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.
Any chance you would share this task, it sound better than clearing the whole log.
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"