log4j2 xml configuration - Log to file and console (with different levels)

前端 未结 5 1020
情深已故
情深已故 2020-12-24 10:58

I want to do two things:

  1. Log to console with a certain log-level
  2. Log to file with another log-level

Console logging seems to work just

5条回答
  •  生来不讨喜
    2020-12-24 11:44


    This should be the problem. The name of the logger usually is your package name (unless you have specifically named it filelogger).
    Try

    Refer Log4j2 Doc

提交回复
热议问题