We are using logback "SiftingAppender" for generating the log files based on the date and other information such as cycle(Each date can have multiple cycles).
Following are the sample logging file names
20150515_1_Job1.log
20150515_2_Job1.log
For the above scenario we are using the following logback configuration.
Following is the
java code for logging the details to the specific logs files.
We have some other jobs that do the housekeeping of the old log files with the retention of 2 days(Two day old files will be moved to another location).
But even after the job completes, we are not able to move the file. We suspect that logback is holding the resource and not letting the file to move or delete.
All the jobs are deployed in a single war file in apache
tomcat 8 server.
Can anyone suggest how to enforce logback to release the resource after logging is completed?
Regards,
Mayuran