How to clean server.log file from JBoss when JBoss is running ? When i try to do
echo 1 > server.log
I get an msg error message that the file is being used by another program (JBoss). Can I use the command line tool ( Windows or linux (I have CygWin )) or an application that I can write to delete this file myself?
PS I do not need this file to have 0kb, but I want it to have less than 100 MB .
JBoss , . , JBoss, , JBoss.
, , <server>/conf˛jboss-log4j.xml. , , : , ..
<server>/conf˛jboss-log4j.xml
( , , ):
<appender name="ROLL" class="org.apache.log4j.rolling.RollingFileAppender"> ... <param name="maxFileSize" value="100MB" /> ... </appender>
, maxBackupIndex ( - 1).
maxBackupIndex
JBoss , .
JMX, , / .
URL ( log4j):
http://jboss.example.com:8080/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.system%3Atype%3DLog4jService%2Cservice%3DLogging
JBoss 5.
.
: , , .