Symptoms
Host Server Logging File Path and Max Life Time Span Questions
Diagnoses
The "LogFilePath" property will save the K2 hostserver log files to the specified directory. Please also make sure that the K2 Service account have access to this directory.
Unfortunately, the K2 Host Server currently does not auto delete logs. The 'MaxLifeTimeSpan' property will usually just work in conjunction with the 'MaxFileSizeKB' property to cycle/create new logs files depending on which ever condition is met first. e.g. if you set the value to “1:0:0:00”, it will cycle every 1 day or when the file size hits 5000KB (whichever is sooner).
Additionally, when changing settings in the HostServerLogging.config file, a K2 blackpearl service/console restart is necessary to affect these changes. Please also backup this config file before making any changes.
Resolution
There is currently a product enhancement request for this auto delete functionality. As a possible workaround, perhaps a powershell or C_ application can be developed to perform this log file deletion base on certain conditions and perhaps can be scheduled by Windows Scheduler.