3 Replies Latest reply on Jul 2, 2014 9:19 PM by James Perkins

    How do I change Jboss' logging directory?

    Adam Chou Newbie

      I'm running jboss-as 7.2. I'm trying to configure all log files to go to /var/log/jboss-as but only the console log is going there. I'm using the init.d script provided with the package and it calls standalone.sh. I'm trying to avoid having to modify startup scripts.

       

      I've tried adding JAVA_OPTS="-Djboss.server.log.dir=/var/log/jboss-as" to my /etc/jboss-as/jboss-as.conf file but the init.d script doesn't pass JAVA_OPTS to standalone.sh when it calls it.

       

      The documentation also says I should be able to specify the path via XML with the following line in standalone.xml:

       

      <path name="jboss.server.log.dir" path="/var/log/jboss-as"/>

       

      However, it doesn't say where in the file to put that. Every place I try to put it causes JBoss to crash on startup saying that it can't parse the standalone.xml file correctly.