title: Log4j2 highlight pattern not working in text-editor?
body: <p>I am using log4j2 for logging my application on Wildfly server (Jboss 8).</p>
  
  <p>I want a customized color coding for my logs which is working perfectly fine when I see logs on my console/terminal.</p>
  
  <p>Following is the pattern:</p>
  
  <p>log4j.xml:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;Configuration status="WARN"&gt;
      &lt;Appenders&gt;
      &lt;Routing name="Routing"&gt;
        &lt;Routes pattern="$${ctx:logFileName}"&gt;
  
          &lt;Route&gt;
  
           &lt;RollingFile name="RollingFile" fileName="standalone/log/platform-${ctx:logFileName}.log" filePattern="standalone/log/platform-${ctx:logFileName}-%d{MM-dd-yyyy}.log.gz" append="true"&gt;
  
              &lt;PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%X{id}] %style{[%X{logFileName}}{magenta}] [%t] %highlight{[%-5level]}{FATAL=red blink, ERROR=red, WARN=yellow bold, INFO=green, DEBUG=green bold, TRACE=magenta} %style{%c{1}:%L}{cyan} - %highlight{%msg%n%throwable}{INFO=white,TRACE=magenta}"/&gt;
  
  
                           .....
  </code></pre>
  
  <p>However, when I try to open my logfile in text-editor like vi or gedit, I get unknown characters like:</p>
  
  <pre><code>[32m15:56:30.536 DEBUG com.syn.test.Test.main() @15 - this is debug message
  [m[32m15:56:30.539 DEBUG com.syn.test.Test.main() @19 - this is debug messge 
  [m
  </code></pre>
  
  <p>I know the color coding would not work on a text-editor, but how not to have unknown characters in my editor and also be able to <strong>see color coding in the console</strong>.</p>