1 Reply Latest reply on Jul 29, 2013 8:28 PM by James Perkins

    Jboss AS 7 logging on wrong level

    Tekin Omer Newbie



                I have been trying to use my own log4j.xml file for logging, as suggested here:



                I did the following things:

      - I created the jboss-deployment-structure.xml file in WEB-INF (since my application is a WAR file) with the corresponding content;

      - I put log4j-1.2.16.jar in my build path;

      - created log4j.xml in src/main/resources (this is where Spring Roo put the file when it generated the project).


           This way, my logging messages from my classes are displayed ok, but errors that bubble up and are caught by DispatcherServlet are shown at DEBUG level in the Console:

      12:06:30,668 DEBUG [org.springframework.web.servlet.DispatcherServlet] (http-localhost- Handler execution resulted in exception - forwarding to resolved error view: ModelAndView: reference to view with name 'uncaughtException'; model is {exception=java.lang.NullPointerException}: java.lang.NullPointerException      at ro.radcom.muzee.bo.impl.JmsServiceImpl.sendMessage(JmsServiceImpl.java:29) [classes:]      at ro.radcom.muzee.web.HomeController.redirectGet(HomeController.java:56) [classes:]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_33]      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_33] ....


                In standalone.xml, the logging part looks like this:

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

                  <console-handler name="CONSOLE">

                      <level name="DEBUG"/>


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



                  <logger category="com.arjuna">

                      <level name="WARN"/>


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

                      <level name="WARN"/>


                  <logger category="sun.rmi">

                      <level name="WARN"/>


                  <logger category="jacorb">

                      <level name="WARN"/>


                  <logger category="jacorb.config">

                      <level name="ERROR"/>



                      <level name="DEBUG"/>


                          <handler name="CONSOLE"/>





                Also, my log4j.xml contains this:


      <logger name="org.springframework.security">

                          <level value="info" />


            but in the console there are some DEBUG level logs such as: "12:06:30,659 DEBUG [org.springframework.security.web.access.intercept.FilterSecurityInterceptor]".


            1. What could be the causes?

            2. Are these 2 problems related in some way?


           Any help would be appreciated .



           Thank you.