The log4j version I use is 1.2.16, a filter to filter the log information for an interval level when customizing Appender. However, there are still errors in the properties file configuration for a long time
Log4j:warn Failed to set the [filter] to value "Org.apache.log4j.varia.LevelRangeFilter".
Log4j:error could not instantiate class [FATAL].
Then I found the answer in a foreign forum.
The propertyconfigurator does not handle the advanced configuration features supported by the Domconfigurator such as Supp ORT for Filters, custom errorhandlers, nested appenders such as the Asyncappender, etc.
Translated as follows:
Propertyconfigurator cannot handle advanced configuration features supported by Domconfigurator, such as filter support, custom error handlers, nested Appender (such as asyncappender), etc.
It seems that XML configuration is the king of log4j. Sure enough, the XML configuration can be used.
Reference Address: http://stackoverflow.com/questions/1257641/cant-set-levelrangefilter-for-log4j