[jboss-user] [Installation, Configuration & Deployment] - Re: How to don't redeploy ear after restart JBoss server

anbramo do-not-reply at jboss.com
Thu Apr 19 15:30:40 EDT 2007


Instead of trying not redeploying the ear after restarting JBoss server, you could try jboss not cleaning your log files after restarting.

By default, every time you restart jboss log4j clean all the logs. In order to avoid this behaviour you have to modify the log4j configuration file($JBOSS_HOME/default/conf/log4j.xml):

Look for the appender used by your application and  and set the Append param in your appender to true. it should then look more or less like this:

<appender name="myapplication" class="org.apache.log4j.FileAppender">
  | <param name="File" value="${jboss.server.home.dir}/log/myapplication.log" />
  | <param name="Append" value="true" />
  | <layout class="org.apache.log4j.PatternLayout">
  | <param name="ConversionPattern" value="%d{dd MMM yyy HH:mm:ss}, %-6p %C:%M:%L %m %n" />
  | </layout>
  | </appender>

Finally, store (if possible) your application log files out of your application folder/file, for example in $JBOSS_HOME/server/default/log/myapplication.log. In this way you avoid to delete your application logs when you deploy a new version.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039012#4039012

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039012



More information about the jboss-user mailing list