Oracle GlassFish Server 3.0.1 Administration Guide

ProcedureTo Change the Limit on the Number of Rotated Log Files

You can change the limit on the number of rotated log files by using the create-system-properties subcommand in remote mode to set a system property.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Use the create-system-properties(1) subcommand to set the com.sun.enterprise.server.logging.max_history_files system property to the maximum number of rotated log files to keep.

    The behavior of the com.sun.enterprise.server.logging.max_history_files system property is as follows:

    • If the property is not set, GlassFish Server keeps a maximum of 10 rotated log files.

    • If the property is set to an invalid number or null, GlassFish Server keeps a maximum of 10 rotated log files.

    • If the property is set to 0, GlassFish Server keeps no rotated log files.


Example 7–6 Changing the Limit on the Number of Rotated Log Files

This example changes the limit on the number of rotated log files to 5.


asadmin> create-system-properties 
com.sun.enterprise.server.logging.max_history_files=5

Command create-system-properties executed successfully.