-
1. Re: How do I change the log file output location??
peterj Feb 28, 2012 1:30 PM (in response to webmonkey8)You do not need to change the jboss-log4j.xml file, instead simply set the jboss.server.log.dir property to the location you want. For example, start the app server like this:
run -Djboss.server.log.dir=d:/jbosslogs
Then the server.log files will go into the d:/jbosslogs directory.
Of course, you can change the jboss-log4j.xml file if you want, using: <param name="File" value="d:/jbosslogs/server.log"/>
If you change the jboss-log4j.xml file, the change should be automatically picked up, but I can't recall the time delay on that, I think it is an hour.
-
2. Re: How do I change the log file output location??
webmonkey8 Feb 28, 2012 4:09 PM (in response to peterj)Thank you, Peter.
I will try changing the parameters in the "jboss-log4j.xml" file. By the way, is there a way to turn off logging altogether?
-
3. Re: How do I change the log file output location??
peterj Feb 28, 2012 6:17 PM (in response to webmonkey8)I suspect that if you remove the file that the logging will not happen (I have't tried this so am not certain).
You could also set the threshold to ERROR (or WARN), that way only error messages would show in the log.
You could also use a rolling file appender with a limit on the size, and a limit on the number of logs to keep. That is usually the best way to limit log sizes. Any turorial on Log4J should show you how.
-
4. Re: How do I change the log file output location??
webmonkey8 Feb 29, 2012 1:11 PM (in response to peterj)Thank you, Peter!