3 Replies Latest reply on Jan 4, 2016 8:05 AM by Stuart Stuart

    Rotating the console.log file within JBoss EAP 6

    Stuart Stuart Newbie

      Hello

       

      Environment:
      JBoss EAP 6.0.1.GA
      Red Hat 6.5
      Standalone and domain installations

       

      Issue:
      I can not rotate the file console.log without restarting JBoss.

       

      Detail:
      I am using JBoss EAP 6.0.1.GA on Red Hat and I would like to be able to manage the files console.log so that they do not fill up the whole disk.


      Our installation writes the console.log files to: /var/log/jboss-as/console.log

       

      A restart of the JBoss application initiates a new console.log file and creates an old copy with a date extension: /var/log/jboss-as/standalone/server.log.YYYY-MM-DD

       

      We can deal with the other JBoss log files using something like: rotate-size value="2048"
      However we can not rotate the console.log log file.

       

      This file will eventually fill up the server hard disks.

       

      I have searched the web and these pages but I can not find any solutions for console.log. I can find lots of questions on the web but not any solutions.

       

      Similar unanswered questions are here:

       

      https://developer.jboss.org/message/820003#820003

      https://developer.jboss.org/message/817689#817689

      https://developer.jboss.org/message/193255#193255

       

      Other answers mention using the file log4j.xml but we do not have that file within this installation.

       

      I have also looked at the JBoss documentation and a couple of books.

       

      One example is this: Chapter 3. JBoss AS Crash Course

      Which contains the excellent line of:  JBoss provides a very sophisticated logging system that nobody completely understands.

      Excellent!

       

      The JBoss documentation does not reference the console.log file.

       

      Anyway....

      We need to be able to manage the file /var/log/jboss-as/console.log and I was hopping or really expecting that the product should really be able to to manage it itself with configuration.

       

      Does anyone have an idea what we can do ?

      Thank you.

       

      One idea would be to use logrotate but I feel that the functionality should really be within the product, as it is for the other log files.