Log4j1 Log Inheritance Description: slightly.
Short description of the problem: the package path behind "log4j.additivity" must be the same as the package path that follows the "Log4j.logger" in the other configuration, log4j will not analyze the package structure of your project.
For example: Consider canceling the inheritance of several logger under the Com.game.gmActivation.logger package, only output to the log in the specified path, and the wrong configuration is to write only one parent package path configuration:
# Log of the following package path is de-inherited
Log4j.additivity.com.game.gmactivation.logger=false
# #行为日志定向配置
Log4j.logger.com.game.gmactivation.logger.gamecurrency=info,gamecurrencylog
Log4j.logger.com.game.gmactivation.logger.onlinerolenum=info,onlinerolenumlog
Log4j.logger.com.game.gmactivation.logger.itembuy=info,itembuylog
Log4j.logger.com.game.gmactivation.logger.zuanshiuse=info,zuanshiuselog
Log4j.logger.com.game.gmactivation.logger.gamesysactive=info,gamesysactivelog
The correct configuration is to enumerate all configurations, each of which corresponds.
# Log of the following package path is de-inherited
Log4j.additivity.com.game.gmactivation.logger.gamecurrency=false
Log4j.additivity.com.game.gmactivation.logger.onlinerolenum=false
Log4j.additivity.com.game.gmactivation.logger.itembuy=false
Log4j.additivity.com.game.gmactivation.logger.zuanshiuse=false
Log4j.additivity.com.game.gmactivation.logger.gamesysactive=false
# #行为日志定向配置
Log4j.logger.com.game.gmactivation.logger.gamecurrency=info,gamecurrencylog
Log4j.logger.com.game.gmactivation.logger.onlinerolenum=info,onlinerolenumlog
Log4j.logger.com.game.gmactivation.logger.itembuy=info,itembuylog
Log4j.logger.com.game.gmactivation.logger.zuanshiuse=info,zuanshiuselog
Log4j.logger.com.game.gmactivation.logger.gamesysactive=info,gamesysactivelog
Welcome to leave a message.
Why is Java log4j.additivity canceling log inheritance invalid