3 Replies Latest reply on Jul 20, 2012 2:41 AM by lukasw44

    How can I enable DEBUG logging during startup of JBoss AS 7 in server.log or boot.log

    andrewv

      Hi,

       

      I would like to enable DEBUG level loging for server.log or boot.log from the very beginning (or as early as possible in the startup) for JBoss AS 7 (Currently using 7.0.2.Final). I tried some of the things in the following link (without luck):

       

      http://community.jboss.org/wiki/JBossBootLogging

       

      - that link seems to only cover up to 6.x.

       

      I would like to turn on DEBUG for (at least) all of the org.jboss.as package.

       

      Any pointers would be appreciated.

       

      Thanks

      Andrew

        • 1. Re: How can I enable DEBUG logging during startup of JBoss AS 7 in server.log or boot.log
          smarlow

          Look at the troubleshooting section here for a server.log example.  Just change the org.jboss.as.jpa to org.jboss.as.

           

          Scott

          1 of 1 people found this helpful
          • 2. Re: How can I enable DEBUG logging during startup of JBoss AS 7 in server.log or boot.log
            andrewv

            Scott,

             

            Many thanks for responding - the support you and the others in the JBoss team provide to all is greatly appreciated, and oh, Merry Christmas

             

            I made the change you suggested, and that generated DEBUG output in boot.log. I also changed the INFO of the console-handler name and periodic-rotating-file-handler, and that generated DEBUG output for server.log and the console. I also set the root-logger level to DEBUG The following is my modified logging subsystem config (for standalone.xml in 7.0.2.Final) that worked:

             

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

                        <console-handler name="CONSOLE">

                            <level name="DEBUG"/>

                            <formatter>

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

                            </formatter>

                        </console-handler>

             

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

                            <level name="DEBUG"/>

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

                        </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="sun.rmi">

                            <level name="WARN"/>

                        </logger>

             

                        <logger category="org.jboss">

                           <level name="DEBUG" />

                        </logger>

             

                        <root-logger>

                            <level name="DEBUG"/>

                            <handlers>

                                <handler name="CONSOLE"/>

                                <handler name="FILE"/>

                            </handlers>

                        </root-logger>

                    </subsystem>

            • 3. Re: How can I enable DEBUG logging during startup of JBoss AS 7 in server.log or boot.log
              lukasw44

              Can i configure org.jboss logger in my own project such like i have got configure databese connection in file project-ds.xml??

               

              i need have got different configure file for jboss logging ?

              before i use log4j and i configure my log like that:

               

              private static Logger logger = Logger.getLogger(Main.class.getName());

               

              and i have got also :

               

              ClasspathPropertyConfigurator.configureWithClasspathResource("configpath");

               

              so its posible to configure different logging by different configuration ??

              eg. I need to use global setting for logger byt sometimes i need to use different config for some special log ??