I changing my log4j lib from log4j to log4j2.
However, for the new log4j2, there is not log file created.
package log4j;
import java.io.IOException;
import java.sql.SQLException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class Log4jExample {
private static final Logger log = LogManager.getLogger(Log4jExample.class);
public static void main(String[] args)throws IOException,SQLException{
log.info("log4j2");
}
}
My properties file as below
status = info
property.basePath = D:/
appender.rolling.type = RollingFile
appender.rolling.name = fileLogger
appender.rolling.fileName= ${basePath}../app.log
appender.rolling.filePattern= ${basePath}/app_%d{yyyyMMdd}.log.gz
appender.rolling.layout.type = PatternLayout
appender.rolling.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} %level [%t] [%l] - %msg%n
appender.rolling.policies.type = Policies
And my project directory setting as per below
Can you guide me, what is wrong with the configuration or project directory setting?
