Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a customer who has %Gig of log files in ProgramData\Qlik\Sense\Log
I've adviced to delete it for now, as I don't see any problems doing so, but some questions remain.
thanx
Attached a log file from my own laptop... not showing much shcoking....
Thanx Egbert,
The best solution though remains clearing out the old logs every once in a while...
Hopefully the QMC will come with an option to keep logs for a certain period that you can set...
And here one of the customers log files...
As you can see, nothing more than te script execution.
But why keep all those log files
Jeroen, this is an open question for Sense - something I've asked about in terms of at least setting the script log verbosity by app or globally. I am not aware of any way presently to stop those time-stamped script logs from being created.
For now, I just manually delete those script log files in Qlik\Sense\Log\Script.
In a later version 2.x I believe those logs get archived to the Qlik\Sense\Repository\Archived Logs\[SERVERNAME]\Script folder.
Hi Tyler,
Instead of manually deleting the logs in C:\PRogramData\Qlik\Sense\Repository\Archived Logs\[SERVERNAME]\Script folder, I created a similar folder structure in a different drive (D:\ProgramData\Qlik\...).
To have the log files being tracked accordingly by Qlik Engine, I modified the "Connection String" value within QMC, to point to Drive D with the same folder structure.
BEFORE:
AFTER
I would expect the new logs will now being created in Drive D, however, that is not the case (New logs are still being generated within "Script" folder of drive C). Is there something that I miss? (I've already restarted all the Qlik Sense Services upon changing the value above).
I appreciate your feedback on this,
Cheers,
Anton
Hello Anton,
The data connections "ServerLogFolder" and "ArchivedLogsFolder" in the QMC are only used by the Monitoring Apps - the Operations Monitor and License Monitor - and do not impact where any Qlik Sense services write their logs but where these apps look for log files.
I am not aware of any way in the QMC to change where these logs are written. As I understand it, that path is set during Sense Server installation.
Hi Tyler,
Thank you for your respond. I guess you're right, because this setting is only located at "Data Connection", of which you usually use to connect to your data sources. I'm hoping the Archived Logs is a bit different because it's automatically created when Qlik Sense is being installed, I guess I'm wrong.
Probably what I should do in the first place, is to have the Qlik Sense installed on Drive D, therefore all the Archived Logs will be installed on Drive D as well. OR, maybe I can re-install the Qlik Sense on Drive D now, even though I'm a bit hesitant doing so (Last time I did it with Qlik Sense 1.0, something stop working).
Anyway, thank you for your input, I appreciate it.
Best regards,
Anton
Hi Jeroen,
What I've done to prevent the C-drive filling up is:
#TryThisOnYourTestServerFirstOfCourse
Best regards,
Egbert
Thanx Egbert,
The best solution though remains clearing out the old logs every once in a while...
Hopefully the QMC will come with an option to keep logs for a certain period that you can set...
I solved this problem with creating an app that runs once per day and clears out old log files :
---------------
Sub DeleteOldFiles (vPath,vNoOfDaysToKeep)
LET command = 'forfiles /P $(vPath) /S /M *.* /D -$(vDaysToKeep) /C "cmd /c del @PATH"';
execute cmd.exe /c "$(command)" ;
End Sub;
Call DeleteOldFiles ('"C:\ProgramData\Qlik\Sense\Repository\Archived Logs\.....\Script\"',30);
------------
This solution requires the EXECTUE command to be allowed on your Sense server. If you do not want that, then just create a scheduled task with windows scheduler that runs this as a batch-command for auto delete of logfiles 30 Days or older:
forfiles /P "C:\ProgramData\Qlik\Sense\Repository\Archived Logs\.....\Script\" /S /M *.* /D -30 /C "cmd /c del @PATH"
brg Robert
Robert,
Thank you for sharing the "workaround".
Cheers,
Anton