Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I am trying to give my own path for "Generate Logfile" Properties.
Is this possible or not? By default It is saving on path where my .QVW file is located
I use this in a include-variable:
sub CopyLogFile
let vLogFile = '"' & DocumentName() & '.log"';
let vLogPath = '"' & left(QvWorkPath, index(QvWorkPath, '\', -1)) & 'LoggingLoad\' & DocumentName() & '.log"';
execute cmd.exe /C copy $(vLogFile) $(vLogPath);
let vLogFile = null(); let vLogPath = null();
end sub
and call then in the last script-row which copied the script-log in log-folder on the same level at my app-folder:
call CopyLogFile
- Marcus
Hi Shivendoo,
the path is fixed, you could always use a .bat file to archive the log files elsewhere, or un-tick 'Timestamp in Log file name' so that I get's overwritten after each reload.
Regards Any
Hi Shivendoo,
There is no such configuration, by default the log file is generated in the same directory where qlikview file resides.
Regards,
Jagan.
Hi Shivendoo,
Not possible I'm afraid. You could potentially create a supporting task in your QMC which triggers after your task, to copy the log to a new location and delete old file.
Hope that helps
Joe
Thank you all for rapid response.
Joe, Could you please let me know the script to move the files from one folder to another.
have a look at the supporting task tab, you can see under external programs you are able to run a commandline statement.
If it's just a single copy command you want to do, you should be able to just put this within the task itself.
Copy xxxexistinglogfilexxxx yyynewfilelocationyyyy /y
if you need to execute a few commands then just put these within a bat file and call that instead.
Hope that helps
Joe
I use this in a include-variable:
sub CopyLogFile
let vLogFile = '"' & DocumentName() & '.log"';
let vLogPath = '"' & left(QvWorkPath, index(QvWorkPath, '\', -1)) & 'LoggingLoad\' & DocumentName() & '.log"';
execute cmd.exe /C copy $(vLogFile) $(vLogPath);
let vLogFile = null(); let vLogPath = null();
end sub
and call then in the last script-row which copied the script-log in log-folder on the same level at my app-folder:
call CopyLogFile
- Marcus
this works too, only thing is you'd get a slightly cut-off logfile then though right?
Yes, you are right. The last part from the copy-routine is cut off. But that isn't very important for me. I like it inside the script to avoid external scripts and triggers.
- Marcus
yea makes sense, I think my picky side wouldn't like not seeing the complete log but I see the point of it