Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is that Possible to Specify Path of the "Generate Logfile"?

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

Untitled2.png

1 Solution

Accepted Solutions
marcus_sommer

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

View solution in original post

10 Replies
awhitfield
Partner - Champion
Partner - Champion

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

jagan
Luminary Alumni
Luminary Alumni

Hi Shivendoo,

There is no such configuration, by default the log file is generated in the same directory where qlikview file resides.

Regards,

Jagan.

Not applicable
Author

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

Not applicable
Author

Thank you all for rapid response.

Joe, Could you please let me know the script to move the files from one folder to another.

Not applicable
Author

commandline.PNG

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

marcus_sommer

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

Not applicable
Author

this works too, only thing is you'd get a slightly cut-off logfile then though right?

marcus_sommer

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

Not applicable
Author

yea makes sense, I think my picky side wouldn't like not seeing the complete log but I see the point of it