3 Replies Latest reply on Mar 2, 2012 12:33 AM by priyank dhadhal

    how to control logs with JBoss ?

    priyank dhadhal Newbie

      How do we control “server.log” file ?  it is growing exponentially I don’t have enough space on server and I can’t afford to shut JBoss for minute.

        • 1. Re: how to control logs with JBoss ?
          Peter Johnson Master

          Which version of JBoss AS?

           

          Change the logging configuration to use a rolling file appender. Excatly how to do that depends on the version of JBoss AS you are using.

           

          Also, please don't use large fonts (or colored fonts) for you entire message.

          • 2. Re: how to control logs with JBoss ?
            john larsen Newbie

            Let me add more information to this post just in case Priyank is not familiar with jboss.

             

            The file you want to edit is in your jboss/server/servername/conf/jboss-log4j.xml

             

            There are 2 ways - one based on time/date based roll over or files size based rollover.

            The time/date based rollover should be active by default (OOTB) and already rolling your server.log nightly. See    "A time/date based rolling appender " about line 23.

             

            The other option is below the time/date option and is commented out. Comment out the first, uncomment and configure the seccond option.

             

            The conf directory is hot so i believe it will accept any changes without restarting jboss. (unless you've slimmed jboss and that hot deploy feature has been disabled.)

             

            -Kip

            • 3. Re: how to control logs with JBoss ?
              priyank dhadhal Newbie

              Thanks a lot John ,

               

              Just managed to get free space by changing jboss-log4j.xml 

               

              <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>   and moved some old logs ,