1 Reply Latest reply on Oct 26, 2005 8:52 AM by chaitanya

    log4j.properties in jboss4.0.3

    chaitanya Novice

      http://www.jboss.org/wiki/Wiki.jsp?page=Logging

      Using your own log4j.properties file - class loader scoping


      i followed above URL.

      in default/conf directory i renamed log4j.xml to jboss-log4j.xml;and in jboss-service.xml i changed log4j.xml to jboss-log4j.xml;

      i want to use my own log4j.properties and it is placed in WEB-INF of test.war directory;

      log4j1.2.4.jar placed in WEB-INF/lib directory.i made changes in jboss-web.xml.

      <class-loading java2ClassLoadingCompliance='false'>
      <loader-repository>test:loader=test.war<loader-repository-config>java2ParentDelegaton=false</loader-repository-config>
      </loader-repository>
      </class-loading>

      log4j.properties


      og4j.category.app=info, SESSME
      log4j.appender.SESSME=org.apache.log4j.RollingFileAppender
      log4j.appender.SESSME.File=${jboss.server.home.dir}/log/std.log
      log4j.appender.SESSME.MaxFileSize=5120KB
      # Keep ten backup files
      log4j.appender.SESSME.MaxBackupIndex=10
      log4j.appender.SESSME.layout=org.apache.log4j.PatternLayout
      log4j.appender.SESSME.layout.ConversionPattern=%d , %m%n




      i have one doubt should i write any java file to read log4j.properties that i placed in WEB-INF directory or else jboss will automatically read log4j.properties file

        • 1. Re: log4j.properties in jboss4.0.3
          chaitanya Novice

          meaning of below exception

          2005-10-26 17:42:16,578 WARN [org.jboss.deployment.DeploymentInfo] Only the root deployment can set the loader repository, ignoring config=LoaderRepositoryConfig(repositoryName: test:loader=test.war, repositoryClassName: org.jboss.mx.loading.HeirarchicalLoaderRepository3, configParserClassName: org.jboss.mx.loading.HeirarchicalLoaderRepository3ConfigParser, repositoryConfig: java2ParentDelegation=false)