Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

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

Redirect logfile for a particular qvw

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
Contributor II

Re: Redirect logfile for a particular qvw

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.

MVP
MVP

Re: Redirect logfile for a particular qvw

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
Community Browser