Logs are rotated automatically based on settings in the logging.properties file. You can change these settings by using the Administration Console.
You can rotate the server log file manually by using the rotate-log subcommand in remote mode. The server log in the default location is immediately moved to a time-stamped file and a new server log is created.
Because log rotation is a dynamic operation, you do not need to restart GlassFish Server for changes to take effect.
Ensure that the server is running.
Remote subcommands require a running server.
Rotate a log by using the rotate-log(1) subcommand.
This example moves the server.log file to yyyy-mm-dd_server.log and creates a new server.log file in the default location.
asadmin> rotate-log Command rotate-log executed successfuly.
You can also view the full syntax and options of the subcommand by typing asadmin help rotate-log at the command line.