-
1. Re: How to force the server.log rotate?
jaikiran Mar 30, 2010 8:35 AM (in response to thomas2008ch)Thomas Chang wrote:
Background to my question:
We have a monitoring tool waching the server.log. Everytime if there is an exception appears in the server.log it will send out an alert. The problem is: after the problem which causes the exception is fixed, the monitoring tool will keep sending out alert since the exception message still stay in the server.log.
I think the best thing to do is to fix that monitoring tool to avoid sending out repeated events for the earlier exception.
Thomas Chang wrote:
Till now I did as follow:
stop the jboss as
rename the server.log or even delete it
restart the jboss as so that a new server.log is cerated.
You don't have to restart the server. Which version of JBoss AS do you use? For AS-5 and earlier, there's a MBean which exposes a reconfigure operation which you can use (assuming you have set "append" attribute of the server.log appender to false).
-
2. Re: How to force the server.log rotate?
thomas2008ch Mar 30, 2010 9:49 AM (in response to jaikiran)I still use Jboss AS 4 and the "append" attribute of the server.log appender is set to true. I can change this at once.
But how can I rotate the server.log?
-
3. Re: How to force the server.log rotate?
jaikiran Mar 30, 2010 11:19 AM (in response to thomas2008ch)Go to jmx-console (example: http://localhost:8080/jmx-console). Under jboss.system domain you will find a MBean named service=Logging,type=Log4jService. Click on that link and you will be shown a page which lists the operations that can be performed on that MBean. You will find a reconfigure() operation (the one which does not take any params). Click on the "Invoke" button beside it.
-
4. Re: How to force the server.log rotate?
thomas2008ch Apr 1, 2010 3:11 AM (in response to jaikiran)Many thanks.