import org.apache.log4j.DailyRollingFileAppender;
import org.apache.log4j.Priority;
/**
* Created with IntelliJ IDEA.
* Description:
* User: jun.lei@counect.com
* Date: 2017-12-07
* Time: 10:07
*/
class LogAppender extends DailyRollingFileAppender {
@Override
public boolean isAsSevereAsThreshold(Priority priority) {
//只判断是否相等,而不判断优先级
return this.getThreshold().equals(priority);
}
}
转载于:https://my.oschina.net/u/732556/blog/1788565