Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

Delete a log file from (within) a qvw?


Hi,

for various reasons, we have a "manual backup routine" in our team: In regular intervals (daily if we can make it and think of it), we manually copy apps to a backup_directory and run them there. There is a code that we have developed that will remove all working_data, which shrinks the apps to about 20% of their size.

The only issue is: Because the scripts are run, there are also .log files created, one per app.

=> Is there any possibility, from within the apps (in the code) that I can delete the .log files?

Thanks a lot!

Best regards,

DataNibbler

6 Replies
Chris_Rice
Support
Support

I don't believe so, but you can turn a large amount of logging off if you would like.  Which log in particular do you not want created?

sudeepkm
Specialist III
Specialist III

I think you can switch off the QlikView log in the QVW as the exact copy you can find under QlikView server.

search for \QDS\1 folder and you can find daily basis as well as time basis document and task logs created.

Chris_Rice
Support
Support

Sudeep,

If you turn of the "Generate Logfile" option in the QVW, it will no longer generate a Document Log either locally or in the \qds\1 folder as mentioned above.

datanibbler
Champion
Champion
Author

Hi Sudeep,

thanks for the answer!

That is not what I wanted to do in this case - I was just looking for a way to delete the logfile created by my own "backup_code" - on a one-off basis, without turning it off - logging is necessary.

However - is there any kind of documentation available, either here or as a QlikView_book, on where the log_files are stored and which logfiles there and where to look if something goes wrong?

I have no training as admin - and chances are slim that I'm going to get any - but it does look like I will have to take on the tasks of QlikView_admin in addition to being developer and designer.

I have the book "QlikView server and publisher" by packtpub. That might be quite useful - I haven't read it in detail yet as I don't have Server access - but now we have relocated all the log_files, maybe I can at least get access to those.

Best regards,

DataNibbler

flipside
Partner - Specialist II
Partner - Specialist II

If you are looking to just delete files in script you can call cmd.exe, but obviously use with caution when deleting and you won't be able to delete the log of the document reloading this script.

LET cmdExe = 'cmd.exe /c del ' & chr(34) & '$(vbs)' & chr(34);

EXECUTE $(cmdExe);

... where vbs is a variable of the file with file path to delete and allows wildcards so *.qvw.log permitted.

You will need to give the script privileges to Execute External Programs under Settings below the load script.

flipside

Bill_Britt
Former Employee
Former Employee

Hi,

I don't think this will work. The reason is that the log is written last after the script has finished running. You could build an supporting task to delete all the log files after all the jobs are finished. If you are trying to delete them when the task is running, I don't understand why you don't turn the logging off.

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.