5 Replies Latest reply on Mar 19, 2009 2:54 PM by datasunny

    Jboss log directory

    datasunny

      hi all,

      The default jboss log is saved to "jboss-4.0.4/server/some_server_conf/log/" (im using jboss-4.0.4). Is there an option available to save logs to somewhere else?
      Thanks for your help.

        • 1. Re: Jboss log directory
          peterj

          Deja-vu! I answered this twice already today!

          Set the jboss.server.log.dir system property. You can set this by adding it to JAVA_OPTS in either run.conf (Linux) or run.bat (Windows).

          • 2. Re: Jboss log directory
            datasunny

            Thanks Peter.
            There are three files in jboss-4.0.4/server/xxx/log/ folder: boot.log, localDB and server.log. I tried your method and "server.log" can be redirect to other place specified by "jboss.server.log.dir", but not the other two. Any ideas?

            • 3. Re: Jboss log directory
              datasunny

              Correction:
              "boot.log" can be redirected to other folder, while "localDB" and "server.log" are not.

              Thanks for your help.

              • 4. Re: Jboss log directory
                peterj

                JBoss AS produces only two logs by default: boot.log and server.log. If you have a third log file, then someone configured that log file. In addition, for both boot.log and server.log, the FILE appender has an entry like the following:

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


                Apprently, someone changed this for the FILE appender for server.log. You need to go into the server/xxx/conf/log4j.xml file and change the File parameter for both appenders (for FILE and for 'localDB') to use a value similar to the one above.

                • 5. Re: Jboss log directory
                  datasunny

                  Thanks Peter, u rock~