1、application.xml: logging.level.com.xxx.xxx.dao=debug 2、log4j2.xml: <Logger name="com.xxx.xxx.dao" level="debug" additivity="true" />