Hi Folks, I generated Log file on the document level Settings --> Documnet Properties --> Generate Log File check box. The log file name generated like 'QVDloader.qvw.log'.
But I need to generate the Log file name like 'QVDLoader.qvw_sucess.log' if the task got sucess or 'QVDLoader.qvw_fail1.log' if the task got failed. The second time got failed, the log file name like 'QVDLoader.qvw_fail2.log' etc...
Is this possible? I need to capture the all the failure tasks logs.
Re: Generate Log file name based on the task status
I think so. You can use the TRACE keyword to write custom messages to the log. If you set ErrorMode to 0 Qlikview will keep executing the rest of script if an error occurs. You can use an if statement that checks the ScriptError variable to 'catch' the error and do something. See the help file for details about Trace and ErrorMode.