title: log4j2 in Java project - Can't find output
body: <p>Im new here, Please help me to understand my new project's <strong>log4j2</strong> configuration.</p>
  
  <p>My question is:</p>
  
  <ul>
  <li><p>How to get all Log outputs?</p></li>
  <li><p>From where should I search log files?</p></li>
  </ul>
  
  <p>Also how to save tomcat console outputs in the <strong>txt</strong> file?</p>
  
  <p>I really appreciate your help and support, Today I want to learn something new from you guys! Thanks!</p>
  
  <p>This is the <code>log4j2.xml</code>:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;configuration status="error" monitorInterval="1800"&gt;
      &lt;Properties&gt;
          &lt;Property name="LOG_HOME"&gt;\Workspaces\logs\paymentweb&lt;/Property&gt;
          &lt;Property name="LOG_DEBUG"&gt;${LOG_HOME}\app\debug.log&lt;/Property&gt;
          &lt;Property name="LOG_INFO"&gt;${LOG_HOME}\app\info.log&lt;/Property&gt;
          &lt;Property name="LOG_ERROR"&gt;${LOG_HOME}\app\error.log&lt;/Property&gt;
      &lt;/Properties&gt;
  
  
      &lt;appenders&gt;
  
          &lt;Console name="Console" target="SYSTEM_OUT"&gt;
          （onMismatch）--&gt;
              &lt;ThresholdFilter level="trace" onMatch="ACCEPT" onMismatch="DENY"/&gt;
  
              &lt;PatternLayout pattern="%d{yyyy.MM.dd HH:mm:ss z} %-5level %class{36}.%M()/%L - %msg%xEx%n"/&gt;
          &lt;/Console&gt;
  
  
          &lt;RollingRandomAccessFile name="app_debug" fileName="${LOG_DEBUG}" append="false" filePattern="${LOG_HOME}\$${date:yyyy-MM}\debug-%d{MM-dd-yyyy}-%i.log.gz"&gt;
              &lt;Filters&gt;
                  &lt;ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="NEUTRAL"/&gt;
              &lt;/Filters&gt;
              &lt;PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss z} %-5level %class{36}.%M()/%L - %msg%xEx%n"/&gt;
              &lt;Policies&gt;
                  &lt;OnStartupTriggeringPolicy /&gt;
                  &lt;SizeBasedTriggeringPolicy size="50 MB" /&gt;
                  &lt;TimeBasedTriggeringPolicy /&gt;
              &lt;/Policies&gt;
          &lt;/RollingRandomAccessFile&gt;
  
  
          &lt;CustomRollingRandomAccessFile name="app_info" fileName="${LOG_INFO}" append="false" filePattern="${LOG_HOME}\$${date:yyyy-MM}\info-%d{MM-dd-yyyy}-%i.log.gz"&gt;
              &lt;Filters&gt;
                  &lt;ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/&gt;
                  &lt;ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/&gt;
              &lt;/Filters&gt;
              &lt;PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss z} %-5level %class{36}.%M()/%L - %msg%xEx%n"/&gt;
              &lt;Policies&gt;
                  &lt;OnStartupTriggeringPolicy /&gt;
                  &lt;SizeBasedTriggeringPolicy size="50 MB" /&gt;
                  &lt;TimeBasedTriggeringPolicy /&gt;
              &lt;/Policies&gt;
          &lt;/CustomRollingRandomAccessFile&gt;
  
  
          &lt;CustomRollingRandomAccessFile name="app_error" fileName="${LOG_ERROR}" append="false" filePattern="${LOG_HOME}\$${date:yyyy-MM}\error-%d{MM-dd-yyyy}-%i.log.gz"&gt;
              &lt;Filters&gt;
                  &lt;ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/&gt;
              &lt;/Filters&gt;
              &lt;PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss z} %-5level %class{36}.%M()/%L - %msg%xEx%n"/&gt;
              &lt;Policies&gt;
                  &lt;OnStartupTriggeringPolicy /&gt;
                  &lt;SizeBasedTriggeringPolicy size="50 MB" /&gt;
                  &lt;TimeBasedTriggeringPolicy /&gt;
              &lt;/Policies&gt;
          &lt;/CustomRollingRandomAccessFile&gt;
      &lt;/appenders&gt;
  
  
      &lt;loggers&gt;
  
          &lt;root level="trace" additivity="false"&gt;
              &lt;appender-ref ref="Console"/&gt;  
              &lt;appender-ref ref="app_debug"/&gt;  
              &lt;appender-ref ref="app_info"/&gt;  
              &lt;appender-ref ref="app_error"/&gt;
         &lt;/root&gt;
      &lt;/loggers&gt;
   &lt;/configuration&gt;
  </code></pre>