6 Replies Latest reply on Nov 7, 2011 8:46 AM by rhusar
      • 1. Re: [stdout] in Eclipse console prints two newlines
        jaikiran

        What do your logging configurations and output look like? Also which file is it logged to?

         

        P.S: 7.0.2 is the latest released version, you might want to try that instead of 7.0.1

        1 of 1 people found this helpful
        • 2. Re: [stdout] in Eclipse console prints two newlines
          kwutzke

          My logging config in standalone.xml looks like this:

          {code}

          <subsystem xmlns="urn:jboss:domain:logging:1.1">

              <console-handler name="CONSOLE" autoflush="true">

                  <level name="INFO"/>

                  <formatter>

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

                  </formatter>

              </console-handler>

              <periodic-rotating-file-handler name="FILE" autoflush="true">

                  <level name="INFO"/>

                  <formatter>

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

                  </formatter>

                  <file relative-to="jboss.server.log.dir" path="server.log"/>

                  <suffix value=".yyyy-MM-dd"/>

                  <append value="true"/>

              </periodic-rotating-file-handler>

              <logger category="org.jboss.as.jpa">

                  <level name="WARN"/>

              </logger>

              <logger category="com.arjuna">

                  <level name="WARN"/>

              </logger>

              <logger category="org.apache.tomcat.util.modeler">

                  <level name="WARN"/>

              </logger>

              <logger category="sun.rmi">

                  <level name="WARN"/>

              </logger>

              <root-logger>

                  <level name="INFO"/>

                  <handlers>

                      <handler name="CONSOLE"/>

                      <handler name="FILE"/>

                  </handlers>

              </root-logger>

          </subsystem>

          {code}

           

          Removing the trailing %n from the pattern-formatter pattern affects all output, logging and stdout. Removing the %n makes the other one-line logging output no a newline at all, two-newline outputs are one-line now. Worse than before.

           

          What's wrong? Maybe a Windows only issue?? How do you fix this? This seems to affect all JBoss AS versions...

           

          Karsten

          • 3. Re: [stdout] in Eclipse console prints two newlines
            jaikiran

            Can you post the actual logs please? Which version of Windows is this? Also which vendor and version of Java are you using?

            • 5. Re: [stdout] in Eclipse console prints two newlines
              kwutzke

              I'm using JDK 7:

               

              java version "1.7.0"

              Java(TM) SE Runtime Environment (build 1.7.0-b147)

              Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

               

              OS is Windows 7 Professional 64 bit, BUILD 7601 (SP1).

               

              Snipped server.log is attached.

               

              Karsten

              • 6. Re: [stdout] in Eclipse console prints two newlines
                rhusar

                Maybe it is just telling you to stop logging via stdout and use a logger instead What happens if you switch to print instead of println? Does that happen on JDK 6 too? Does it happen on other OS as well?

                public void println(String x)

                Prints a String and then terminate the line. This method behaves as though it invokes PrintStream.print(String) and then PrintStream.println().