1 Reply Latest reply on Jun 27, 2012 11:14 AM by jamezp

    Using expressions in logging configuration

      Hi,

      We are upgrading to JBoss AS7 from 4.x.  In the 4.x environment, we had the jboss-log4j.xml file setup so that the server log would include the hostname in the filename. So instead of the log being named, 'server.log' it would come out xxx-be03-2.log or xxx-be03-1.log or whatever the server name was. This was accomplished by using a system property in the jboss-log4j.xml file :

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

       

      However, in AS7, I am finding that expressions are not allowed for the "file" attribute in the logging configuration, so I cannot use a system property to name my log file. How do I accomplish what I was doing in JBoss 4 using JBoss 7 logging?

       

      Thank you!

        • 1. Re: Using expressions in logging configuration
          jamezp

          Not that it will help you now, but there is a JIRA to add expressions to the file names. The only thing I can think of would be to hard-code the file name. If you're using domain mode and then each server has it's own log directory with server.log. Not sure if that was the concern with adding the server id.

           

          --

          James R. Perkins

          1 of 1 people found this helpful