4 Replies Latest reply on Jun 29, 2015 10:58 AM by Raghunadh Mogilisetti

    logging configuration used in standalone.xml is not working

    Jagannath Mishra Newbie

      Hi,

      We are using JBoss as.7.1 server and trying to use jboss logging subsystem by using standalone.xml . The requirement is to set different log level in production without restarting the server . I have removed all log4j dependency i.e log4j.properties and log4j jar files from WAR file used in deployment.I am still not seeing any log information printing in file myPage.log. I have already followed many blog. I think,I should not modify anything default log4j.properties placed in server. Thanks advance for your kindly help. your speedy response will be really helpful.

      Here is standalone.xml

      <?xml version='1.0' encoding='UTF-8'?>

      <server xmlns="urn:jboss:domain:1.2">

          <extensions>

              <extension module="org.jboss.as.clustering.infinispan"/>

              <extension module="org.jboss.as.configadmin"/>

              <extension module="org.jboss.as.connector"/>

              <extension module="org.jboss.as.deployment-scanner"/>

              <extension module="org.jboss.as.ee"/>

              <extension module="org.jboss.as.ejb3"/>

              <extension module="org.jboss.as.jdr"/>

              <extension module="org.jboss.as.jmx"/>

              <extension module="org.jboss.as.jpa"/>

              <extension module="org.jboss.as.logging"/>

              <extension module="org.jboss.as.mail"/>

              <extension module="org.jboss.as.naming"/>

              <extension module="org.jboss.as.osgi"/>

              <extension module="org.jboss.as.pojo"/>

              <extension module="org.jboss.as.remoting"/>

              <extension module="org.jboss.as.sar"/>

              <extension module="org.jboss.as.security"/>

              <extension module="org.jboss.as.threads"/>

              <extension module="org.jboss.as.transactions"/>

              <extension module="org.jboss.as.web"/>

              <extension module="org.jboss.as.webservices"/>

              <extension module="org.jboss.as.weld"/>

          </extensions>

       

          <management>

              <security-realms>

                  <security-realm name="ManagementRealm">

                      <authentication>

                          <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>

                      </authentication>

                  </security-realm>

                  <security-realm name="ApplicationRealm">

                      <authentication>

                          <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>

                      </authentication>

                  </security-realm>

              </security-realms>

              <management-interfaces>

                  <native-interface security-realm="ManagementRealm">

                      <socket-binding native="management-native"/>

                  </native-interface>

                  <http-interface security-realm="ManagementRealm">

                      <socket-binding http="management-http"/>

                  </http-interface>

              </management-interfaces>

          </management>

       

          <profile>

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

                  <console-handler name="CONSOLE">

                      <level name="INFO"/>

                      <formatter>

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

                      </formatter>

                  </console-handler>

                  <file-handler name="jaglog" autoflush="false">

                      <level name="WARNING"/>

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

                      <append value="false"/>

                  </file-handler>

                  <file-handler name="JagaPagelog" autoflush="false">

                      <level name="DEBUG"/>

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

                      <append value="false"/>

                  </file-handler>

                  <file-handler name="JagaPageServicesLog" autoflush="false">

                      <level name="WARN"/>

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

                      <append value="false"/>

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

                      <level name="WARN"/>

                  </logger>

                  <logger category="jacorb">

                      <level name="WARN"/>

                  </logger>

                  <logger category="com.apple.ist.hr.mypage.web" use-parent-handlers="true">

                      <level name="INFO"/>

                  </logger>

                  <root-logger>

                      <level name="INFO"/>

                      <handlers>

                          <handler name="CONSOLE"/>

                          <handler name="FILE"/>

                      </handlers>

                  </root-logger>

              </subsystem>

             

       

      </server>