0 Replies Latest reply on Jul 9, 2005 9:55 AM by nickpiper

    Using ${jboss.server.home.dir} in my application's log4j con

    nickpiper

      I am trying to adjust the configuration of a closed source application to allow it to run inside several copies of JBoss on the same machine.

      This means the logging has to go to different places for each copy.

      <param name="File" value="${jboss.server.home.dir}/log/mcs.log"/>


      Seems like a good way to do this, only it doesn't work for me :-( No log is created, and I can't find an error message anywhere too. To check the property can be replaced, I tried this:

      <param name="ConversionPattern"
       value="%d{dd MMM HH:mm:ss} TOKEN ${jboss.bind.address} TOKEN ${jboss.server.home.dir} TOKEN [%t] %-5p %l %x - %m%n"/>


      and set the File to just /tmp/mcs.log.

      The log entries show that the bind.address is replaced with 0.0.0.0 as expected, and home.dir is replaced with /opt/jboss-4.0.1sp1/server/caps as expected.

      Maybe the File param doesn't go through the substitution for some reason? So I tried putting jboss.bind.address in the filename of the log, and the log saved does contain 0.0.0.0 in the filename.

      I saw jboss.server.home.dir used in the JBoss global log4j configuration, so I know it *should* work. This has me very confused!

      Permissions are ok, when I use:

      <param name="File" value="/opt/jboss-4.0.1sp1/server/caps/log/mcs.log"/>


      Which is what the first version should be expanded to, it works fine.

      I'd be greatful for any suggestions!

      Thanks,

      Nick