How to clear server.log in JBoss?

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 .

+5
source share
2 answers

JBoss , . , JBoss, , JBoss.

, , <server>/conf˛jboss-log4j.xml. , , : , ..

( , , ):

    <appender name="ROLL" class="org.apache.log4j.rolling.RollingFileAppender">
            ...
            <param name="maxFileSize" value="100MB" />
            ...
    </appender>

, maxBackupIndex ( - 1).

+3

All Articles