4 Replies Latest reply on Jan 13, 2016 3:12 AM by Alexis Hassler

    Where are sent the System.out.println ?

    Alexis Hassler Apprentice

      With JBoss EAP 6.4, when I print a message in System.out, I don't see them anywhere. In older versions, they were sent in a sysout logger, but I doesn't seem to be the case anymore.

       

      How can I do to have these messages back ?

        • 1. Re: Where are sent the System.out.println ?
          Jay SenSharma Master

          It is processed by the CONSOLE appender ...so if you are not using the "standalone-full-ha.xml" profile then you should be able to see the STDOUT in the console output.

           

          Because the "standalone-full-ha.xml"  does not have the <console-handler name="CONSOLE">  defined to it.

                      <root-logger>
                          <level name="INFO"/>
                          <handlers>
                              <handler name="FILE"/>     <!-- SEE It does not have CONSOLE appender ->
                          </handlers>
                      </root-logger>
          

           

           

           

          Where as Other standalone.xml/standalone-ha.xml and standalone-full.xml   it is different

          Like following:

           

                      <root-logger>
                          <level name="INFO"/>
                          <handlers>
                              <handler name="CONSOLE"/>
                              <handler name="FILE"/>
                          </handlers>
                      </root-logger>
          

          So please check which profile are you using "full-ha" or other?

           

          Regards

          Jay SenSharma

          • 2. Re: Where are sent the System.out.println ?
            Panagiotis Chavariotis Novice

            First of all I suggest you to check your profile settings for any console logger definition.

            Secondly you have to know that JBoss EAP6 logging is not exactly the same as EAP5/4.

            You can follow this https://docs.jboss.org/author/display/AS72/Logging+Configuration for more information (Per-deployment Logging)

            • 3. Re: Where are sent the System.out.println ?
              jaikiran pai Master

              Like Jay says, the console appender seems to be missing which I believe is intentional in EAP where logging to console is discouraged.

              • 4. Re: Where are sent the System.out.println ?
                Alexis Hassler Apprentice

                Thanks for your answers. In my configuration, I do have a CONSOLE handler. All the regular log are sent to the standard output.

                 

                My problem is only when I have System.out.println in my code (I know I shouldn't). With AS 7, these messages are sent to the stdout logger with level INFO and therefore can be seen in the console and in server.log.

                On EAP 6.4, these messages seem to be lost.