首先需要明白的概念:
appenders:定义表示日志输出的地方文件或控制台等等
logger:定义那个日志级别向那个appender输出
自定义log4j2日志级别
https://blog.csdn.net/xulele_csdn/article/details/85269929
不同日志级别输出到不同的文件中
https://blog.csdn.net/zzzgd_666/article/details/80407002
详细使用log4j2参见
https://blog.csdn.net/henry115/article/details/78473313