Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Glassfish Logging

Is there anyway to get glassfish to delete some of the old log files automatically? Yesterday we had a disk full issue due to glassfish logging. There is not apparent way to do this in the Admin Console, unless we are just ignorant.

like image 235
arinte Avatar asked Apr 06 '09 14:04

arinte


3 Answers

You can get Glassfish to delete the log files, in the Log Rotate Manager: http://blogs.oracle.com/sirajg/entry/managing_rotated_log_files

like image 185
Björn Avatar answered Nov 14 '22 06:11

Björn


In 3.1 the command is now (supposed default of 10 does not exist)

asadmin> set-log-attributes com.sun.enterprise.server.logging.GFFileHandler.maxHistoryFiles=10

http://docs.oracle.com/cd/E18930_01/html/821-2416/gklmn.html#gkmai

like image 32
JamesRyan Avatar answered Nov 14 '22 07:11

JamesRyan


If you cannot or do not want to install GlassFish Performance Advisor as suggested in the other answer, another way is described in https://wikis.oracle.com/display/GlassFish/FaqDeleteRotatedLogs:

The com.sun.enterprise.server.logging.max_history_files system property limits the number of rotated log files for both access logging and the server log

like image 40
Suma Avatar answered Nov 14 '22 06:11

Suma