6 Replies Latest reply on Mar 3, 2015 2:42 PM by James Perkins

    system.out.println not working on wildfly 8.2

    Mohammad Weshah Novice

      Dear Professionals,

      i upgrade to wildfly 8.2 server but any system.out.print in the code does not appear on console or server.log , what change i have to do to enable it .

       

      Regards

      wish79

        • 1. Re: system.out.println not working on wildfly 8.2
          Dinoop P Newbie

          I have checked the same in wildfly 8.2.it is working.

           

          Please check the logging subsystem in standalone.xml and verify that the console appender is enabled.

          • 2. Re: system.out.println not working on wildfly 8.2
            Mohammad Weshah Novice

            i did not change any configuration setting ,this is the part of standalone file :

             

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

                        <console-handler name="CONSOLE">

                            <level name="INFO"/>

                            <formatter>

                                <named-formatter name="COLOR-PATTERN"/>

                            </formatter>

                        </console-handler>

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

                            <formatter>

                                <named-formatter name="PATTERN"/>

                            </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="com.arjuna">

                            <level name="WARN"/>

                        </logger>

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

                            <level name="WARN"/>

                        </logger>

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

                            <level name="DEBUG"/>

                        </logger>

                        <logger category="sun.rmi">

                            <level name="WARN"/>

                        </logger>

                        <logger category="jacorb">

                            <level name="WARN"/>

                        </logger>

                        <logger category="jacorb.config">

                            <level name="ERROR"/>

                        </logger>

                        <root-logger>

                            <level name="INFO"/>

                            <handlers>

                                <handler name="CONSOLE"/>

                                <handler name="FILE"/>

                            </handlers>

                        </root-logger>

                        <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>

                    </subsystem>

             

            what is wrong in the above ?

            • 3. Re: system.out.println not working on wildfly 8.2
              Dinoop P Newbie

              If you have a log4j.xml in your application,remove it and retry

              1 of 1 people found this helpful
              • 4. Re: system.out.println not working on wildfly 8.2
                Mohammad Weshah Novice

                Yes, i have a log4j.properties file , when i remove it the system.out.print and logging is working ,

                but the problem the hibernate logging start working i tried to disabled it by adding in standalone.xml wildfly server file the following,

                 

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

                    <level name="OFF" />

                   </logger>

                   <logger category="jboss.jdbc.spy">

                    <level name="OFF"/>

                   </logger>

                    <logger category="org.hibernate.SQL">

                    <level name="OFF" />

                    </logger>

                 

                but still not working, my questions are:

                1- can not add log4j.properties in my application to override server logging and enabled system.out.print.

                2- how can disabled hibernate logging .

                 

                Regards

                Wish79

                • 5. Re: system.out.println not working on wildfly 8.2
                  Dinoop P Newbie

                  Mohammad,

                  I don't know the way to enable both together.But you can put your own log4j.xml and configure the file appender. The System,out.print also will be printed in file. So that u can open the file and see your logs.

                  • 6. Re: system.out.println not working on wildfly 8.2
                    James Perkins Master

                    What properties do you have set in your persistence.xml file?

                     

                    --

                    James R. Perkins