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.
Asked
Active
Viewed 1.0k times
3 Answers
7
You can get Glassfish to delete the log files, in the Log Rotate Manager: http://blogs.oracle.com/sirajg/entry/managing_rotated_log_files

Bill the Lizard
- 398,270
- 210
- 566
- 880

Björn
- 29,019
- 9
- 65
- 81
-
In case any one else comes across this, the link has changed to https://blogs.oracle.com/sirajg/entry/managing_rotated_log_files – dann.dev Jul 25 '12 at 22:11
-
is this available in glassfish open source edition ? – Kenshin Oct 09 '16 at 08:39
4
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

JamesRyan
- 221
- 1
- 2
- 12
-
Why has this been downvoted? Neither of the other answers work anymore! – JamesRyan Nov 10 '14 at 17:02
-
2
1
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

Suma
- 33,181
- 16
- 123
- 191