Log4j2 - Overriding log file programmatically
问题 We are currently upgrading log4j1 to log4j2, In our project we have log4j1 code that overriding the log file programatically by calling below 2 methods together setAppend(false); activateOptions(); What is equivalent option in log4j2?. Below is my sample code? class TestAppender extends RollingFileAppender { public void m1(){ setAppend(false); activateOptions(); } } class Test{ public void callm1(){ TestAppender ta = new TestAppender(); ta.m1(); } log4j.properties # Define the root logger