0 Replies Latest reply on Dec 2, 2016 2:04 AM by An Qin

    Wildfly log of Stdout/Stderr has one more \r at the end of each line on Windows

    An Qin Newbie

      Hi,

       

      On Windows platform, wildfly logs stdout/stderr in files with one more \r at the end of each line. Here is the pattern format defined in standalone-full.xml:

       

                  <formatter name="PATTERN">

                      <pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>

                  </formatter>

                  <formatter name="COLOR-PATTERN">

                      <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>

                  </formatter>

                 

      It is the default one. The output seems normal, but actually the end of line \r\r\n. It should be \r\n. Other lines logged by itself has no such issue.

       

      2016-12-02 11:14:54,952 ERROR [stderr] Exception in thread "Thread-242" java.lang.NullPointerException

      2016-12-02 11:15:03,497 INFO  [stdout] Test print:

      2016-12-02 11:15:03,498 INFO  [stdout] testtest

      2016-12-02 11:15:03,498 INFO  [stdout] Test println:

      2016-12-02 11:15:03,498 INFO  [stdout] testtest

       

      It only happenson Windows. Does anyone knows the reason?

       

       

      Thanks,

       

      Qin An.