6 Replies Latest reply: Mar 12, 2012 9:14 AM by Bill Robinson RSS

Change appserver.log file size

kaartoj

Hi, i have question concerning appserver.log file. How i change log file size?

Now bladelogic create new log file every time when old one reach 20mb size. For example appserver.log -> appserver.log.1 -> appserver.log.2 etc. etc.

I want config log properties like that,log size is 500 mb and then bladelogic create new log file to server.

 

Can someone tell where i  can change this kind of adjustment. Thx alot!

  • 1. Change appserver.log file size
    Prabhat Handoo

    Log rotation is full supported by log4j by configuring the <appender> configuration for the Application Server in the log4crc.txt file.  For more information on configuring the log4crc.txt file, see the Setting Up Configuration Files section in the BladeLogic Administration Guide. What version are you using? I think you have to add a line like: rollsize="10000000" rolltimeinsec="2419200" rollmaxfiles="10" layout="dated"

  • 2. Change appserver.log file size
    Rohit Nayyar

    Which version is this ?

     

    For 7.x

    go to /<install_dir>/br/

    in the file appserver.cf and change 20000KB to whatever you want 500000KB value.  (i am not sure if there is a limit on this size)

    # Set the max size of the file

    log4j.appender.R.MaxFileSize=20000KB

     

     

    For 8.x, this is per deployment, change for _template so that future appservers if configured get this setting

     

    go to <install_dir>/br/deployments/<appserver instance>/log4j.properties

    e.g. <install_dir>/br/deployments/default/log4j.properties

     

    Change the line

    # Set the max size of the file

    log4j.appender.R.MaxFileSize=20000KB  as explained above.

     

     

    Thanks,

    Rohit

  • 3. Change appserver.log file size
    kaartoj

    Thanks to both. I have BL version 8.0. and now i can change my appserver.log file size!

  • 4. Change appserver.log file size
    kaartoj

    Now i change appserver.log file to 500mb (last size 20mb) via log4j.properties.

    Now i think by my self is there some kind recommended size to appserver.log? Is 500mb little or big?

    Is there any risk that file may some reason corrupt when it is that big?

  • 5. Change appserver.log file size
    Rohit Nayyar

    I dont think it can affect performance. But some log4j formats are know to slow down application performances.

    But the size should not be a problem

    I dont knw if there is a recommendation for this.

    But it really depends on if you are using  any tools to monitor these logs.

    500 MB sounds high to me, but definately i will not go for something like 1 GB as I am aware that many of the simlple log viewers I use will eat up memory and take more time to load such a huge log.

  • 6. Re: Change appserver.log file size
    Bill Robinson

    It might make more sense to set the log to like 20m and just keep more copies – 20, 30, etc.

     

    Opening a 500m log file in notepad will be fun…