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: 
Not applicable

Redirect logfile for a particular qvw

In my qvw file, I have activated the following options:

- Generate logfile

- Timestamp in Logfile Name

Once I deploy it on the server, all logs are generated in the same folder where the qvw file is contained.

How can i change it?

I'd wish to put in the folder ./logs

Thanks,

3 Replies
Not applicable
Author

Hi,

"On sucessful execution" of your task could trigger a batch file. The batch file moves/copies the log file to the desired folder

-Alex

stantrolav
Partner - Creator II
Partner - Creator II

1. Trigger on end of reload in self-application, that run macro:

     Sub RunCMDComand

     CMDCommand = ActiveDocument.Variables("RunCMD").GetContent.String

     set objShell = CreateObject("WScript.Shell")

     objShell.run CMDCommand,0,true

     end sub

2. Make variable RunCMD like this:

     ='CMD /C MOVE ' & SubField(DocumentPath(), '.', 1) & '*.log ' & Replace(DocumentPath(), DocumentName(), 'Log')

3. Be alerted that you MUST CREATE FOLDER "Log" in the folder that .QVW is in.

Macro would run after App is reloaded in full-client app either by server.

Cheers and fo to HELL with batch files.

jonathandienst
Partner - Champion III
Partner - Champion III

No way to do this directly in Qlikview. The previous suggestions are possible workarounds. You need to be sure that the qvb process has released the lock on the log file before copying.

You could also schedule a batch/powershell job to sweep the log files daily into the log folder.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein