Log4j2 can only be output from console under tomcat7, but there is no log output.

  java, question

My project is based on maven’s web project, and log4j2 is applied. in the main method, console and log output can be tested, but in the project, only console output is available, and no log record is available. I hope god can give me some advice.

Standalone is slightly different from the web.

Or did the subject just forget to add log4j-web?