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.
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.
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,
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.
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.
What I've done to prevent the C-drive filling up is:
- Create a new directory on your D-drive, e.g. D:\QlikSenseArchivedLogs
- Stop your Qlik Sense services
- Move C:\ProgramData\Qlik\Sense\Repository\Archived Logs\YOURHOSTNAME to D:\QlikSenseArchivedLogs\YOURHOSTNAME. This might be a good moment for a coffee break .
- Open a command prompt (elevated, which is default in Windows Server 2012 R2)
- Go to C:\ProgramData\Qlik\Sense\Repository\Archived Logs\:
cd "C:\ProgramData\Qlik\Sense\Repository\Archived Logs\"
- Create a directory junction:
mklink /J YOURHOSTNAME D:\QlikSenseArchivedLogs\YOURHOSTNAME
- Try to navigate in Explorer from C:\ProgramData\Qlik\Sense\Repository\Archived Logs\ to YOURHOSTNAME, just to be sure.
- Start your Qlik Sense services
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)" ;
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"