title: log4j2 ERROR StatusLogger Unrecognized conversion specifier
body: <p>I have log4j2 in my project when I run main method in intellij Idea ,it correct to print log. </p>
  
  <p>when i use maven-shade-plugin package project to jar file, and run jar as standalone application it shows error:</p>
  
  <blockquote>
    <p>java -cp package.jar com.xxx.TestMain</p>
  </blockquote>
  
  <p>the console output</p>
  
  <pre><code>ERROR StatusLogger Unrecognized format specifier [d]
  ERROR StatusLogger Unrecognized conversion specifier [d] starting at position 16 in conversion pattern.
  ERROR StatusLogger Unrecognized format specifier [thread]
  ERROR StatusLogger Unrecognized conversion specifier [thread] starting at position 25 in conversion pattern.
  ERROR StatusLogger Unrecognized format specifier [level]
  ERROR StatusLogger Unrecognized conversion specifier [level] starting at position 35 in conversion pattern.
  ERROR StatusLogger Unrecognized format specifier [logger]
  ERROR StatusLogger Unrecognized conversion specifier [logger] starting at position 47 in conversion pattern.
  ERROR StatusLogger Unrecognized format specifier [msg]
  ERROR StatusLogger Unrecognized conversion specifier [msg] starting at position 54 in conversion pattern.
  ERROR StatusLogger Unrecognized format specifier [n]
  ERROR StatusLogger Unrecognized conversion specifier [n] starting at position 56 in conversion pattern.
  ERROR StatusLogger Unrecognized format specifier [d]
  ERROR StatusLogger Unrecognized conversion specifier [d] starting at position 16 in conversion pattern.
  ERROR StatusLogger Unrecognized format specifier [thread]
  ERROR StatusLogger Unrecognized conversion specifier [thread] starting at position 25 in conversion pattern.
  ERROR StatusLogger Unrecognized format specifier [level]
  ERROR StatusLogger Unrecognized conversion specifier [level] starting at position 35 in conversion pattern.
  ERROR StatusLogger Unrecognized format specifier [logger]
  ERROR StatusLogger Unrecognized conversion specifier [logger] starting at position 47 in conversion pattern.
  ERROR StatusLogger Unrecognized format specifier [msg]
  ERROR StatusLogger Unrecognized conversion specifier [msg] starting at position 54 in conversion pattern.
  ERROR StatusLogger Unrecognized format specifier [n]
  ERROR StatusLogger Unrecognized conversion specifier [n] starting at position 56 in conversion pattern.
  </code></pre>
  
  <p>pom.xml config . log4j2.version = 2.10.0, spring boot version is 1.5.9.RELEASE</p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-logging&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
          &lt;version&gt;1.7.25&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j-slf4j-impl&lt;/artifactId&gt;
          &lt;version&gt;${log4j2.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j-api&lt;/artifactId&gt;
          &lt;version&gt;${log4j2.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j-core&lt;/artifactId&gt;
          &lt;version&gt;${log4j2.version}&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.1.0&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;createDependencyReducedPom&gt;false&lt;/createDependencyReducedPom&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;shade&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;transformers&gt;
                              &lt;transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"&gt;
                                  &lt;resource&gt;META-INF/spring.handlers&lt;/resource&gt;
                              &lt;/transformer&gt;
                              &lt;transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"&gt;
                                  &lt;resource&gt;META-INF/spring.schemas&lt;/resource&gt;
                              &lt;/transformer&gt;
                          &lt;/transformers&gt;
                          &lt;filters&gt;
                              &lt;filter&gt;
                                  &lt;artifact&gt;*:*&lt;/artifact&gt;
                                  &lt;excludes&gt;
                                      &lt;exclude&gt;META-INF/*.SF&lt;/exclude&gt;
                                      &lt;exclude&gt;META-INF/*.DSA&lt;/exclude&gt;
                                      &lt;exclude&gt;META-INF/*.RSA&lt;/exclude&gt;
                                  &lt;/excludes&gt;
                              &lt;/filter&gt;
                          &lt;/filters&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.8&lt;/source&gt;
                  &lt;target&gt;1.8&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
      &lt;resources&gt;
          &lt;resource&gt;
              &lt;directory&gt;src/main/resources&lt;/directory&gt;
          &lt;/resource&gt;
      &lt;/resources&gt;
      &lt;sourceDirectory&gt;src/main/java&lt;/sourceDirectory&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>log4j2.xml config</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Configuration status="debug" monitorInterval="30" shutdownHook="disable"&gt;
      &lt;properties&gt;
          &lt;property name="LOG_HOME"&gt;/data1/logs&lt;/property&gt;
          &lt;property name="JOB_NAME"&gt;noname&lt;/property&gt;
      &lt;/properties&gt;
      &lt;Appenders&gt;
          &lt;Console name="Console" target="SYSTEM_OUT"&gt;
              &lt;PatternLayout pattern="%date{yyyy-MM-dd HH:mm:ss} [%t] %level [%logger{36}][%file:%line] %msg%n%throwable"/&gt;
          &lt;/Console&gt;
  
          &lt;RollingRandomAccessFile name="DetailFile"
                                   fileName="${sys:LOG_HOME}/${sys:JOB_NAME}/detail.log" bufferedIO="false"
                                   filePattern="${sys:LOG_HOME}/${sys:JOB_NAME}/detail.%d{yyyy-MM-dd}-%i.log"&gt;
  
              &lt;PatternLayout
                      pattern="%date{yyyy-MM-dd HH:mm:ss} [%t] %level [%file:%line] %msg%n%throwable"/&gt;
              &lt;Policies&gt;
                  &lt;TimeBasedTriggeringPolicy interval="1" modulate="true"/&gt;
                  &lt;SizeBasedTriggeringPolicy size="500 MB"/&gt;
              &lt;/Policies&gt;
          &lt;/RollingRandomAccessFile&gt;
          &lt;RollingRandomAccessFile name="error"
                                   fileName="${sys:LOG_HOME}/${sys:JOB_NAME}/error.log" bufferedIO="true"
                                   filePattern="${sys:LOG_HOME}/${sys:JOB_NAME}/error.%d{yyyy-MM-dd}.log"&gt;
  
              &lt;PatternLayout
                      pattern="%date{yyyy-MM-dd HH:mm:ss} [%t] %level [%logger{36}:%line] %msg%n%throwable"/&gt;
              &lt;Policies&gt;
                  &lt;TimeBasedTriggeringPolicy interval="1" modulate="true"/&gt;
              &lt;/Policies&gt;
          &lt;/RollingRandomAccessFile&gt;
      &lt;/Appenders&gt;
      &lt;Loggers&gt;
          &lt;Root level="info"&gt;
              &lt;AppenderRef ref="DetailFile"/&gt;
              &lt;AppenderRef level="error" ref="error"/&gt;
          &lt;/Root&gt;
      &lt;/Loggers&gt;
  &lt;/Configuration&gt;
  </code></pre>