JBOSS7 settings
Enter the Standalone.xml in Standalone\configuration
Locate the original node below
<periodic-rotating-file-handler name= "File" autoflush= "true" >
<encoding value= "UTF-8"/>
<formatter>
<pattern-formatter pattern= "%d{hh:mm:ss,sss}%-5p [%c] (%t)%s%e%n"/>
</formatter>
<file relative-to= "Jboss.server.log.dir" path= "Server.log"/>
<suffix value= ". Yyyy-mm-dd"/>
<append value= "true"/>
</periodic-rotating-file-handler>
This is a file by date to output the journal file, one per day.
Comment out and use the following configuration
<size-rotating-file-handler name= "File" >
<formatter>
<pattern-formatter pattern= "%d{hh:mm:ss,sss}%-5p [%c] (%t)%s%e%n"/>
</formatter>
<file relative-to= "Jboss.server.log.dir" path= "Server.log"/>
<rotate-size value= "20m"/>
<max-backup-index value= "/>"
<append value= "true"/>
</size-rotating-file-handler>
Note: Keep 20 files, each file is 20MB.
The file name is: Server.log.1 ..... server.log.20
There's also a server.log that indicates the current input journal
JBOSS6 settings
Set the JBOSS6 log journaling profile, such as: D:\software\jboss-6.0.0.Final\server\default\deploy\jboss-logging.xml
As with JBOSS7, comment out the Periodic-rotating-file-handler node first
Add the following configuration, meaning that the log diary has a total of 20 files, each 20M.
<!--A size based file rolling appender--
<size-rotating-file-handler
File-name= "${jboss.server.log.dir}/server.log"
Name= "FILE"
Autoflush= "true"
Append= "true"
Rotate-size= "20m"
Max-backup-index= ">"
<error-manager>
<only-once/>
</error-manager>
<formatter>
<pattern-formatter pattern= "%d%-5p [%c] (%t)%m%n"/>
</formatter>
</size-rotating-file-handler>
JBOSS6,JBOSS7 only keeps a certain amount of log diaries.