You can create multiple logs file by using same log4j properties file or you can send logs to multiple files by using same log4j file.
Add this below to your log4j properties file.
log4j.rootLogger=TRACE, stdout
log4j.appender.dataLogs=org.apache.log4j.FileAppender
log4j.appender.dataLogs.File=logs/logFile1.log
log4j.appender.dataLogs.layout=org.apache.log4j.PatternLayout
log4j.appender.dataLogs.layout.ConversionPattern=%d...
undefined
201
package com.avaya.deletelogs;
import java.io.File;
import java.io.FilenameFilter;
import java.util.Arrays;
import java.util.List;
public class DeleteLogs {
private String baseDir = "/opt/java/IVRLog";
private int daysBack = 4;
public void invokeProcess() {
getFolders();
}
public void getFolders() {
try...