Use the following example to configure the rotation policy settings for Java virtual machine (JVM) logs:
Using Jacl:
set server [$AdminConfig getid /Cell:mycell/Node:mynode/Server:server1/]Example output:
server1(cells/mycell/nodes/mynode/servers/server1:server.xml#Server_1)
The following example identifies the output stream log:
set log [$AdminConfig showAttribute $server1 outputStreamRedirect]The following example the error stream log:
set log [$AdminConfig showAttribute $server1 errorStreamRedirect]Example output:
(cells/mycell/nodes/mynode/servers/server1:server.xml#StreamRedirect_2)
$AdminConfig show $logExample output:
{baseHour 24} {fileName ${SERVER_LOG_ROOT}/SystemOut.log} {formatWrites true} {maxNumberOfBackupFiles 1} {messageFormatKind BASIC} {rolloverPeriod 24} {rolloverSize 1} {rolloverType SIZE} {suppressStackTrace false} {suppressWrites false}
The following example sets the rotation log file size to two megabytes:
$AdminConfig modify $log {{rolloverSize 2}}The following example sets the rotation policy to manage itself. It is based on the age of the file with the rollover algorithm loaded at midnight, and the log file rolling over every 12 hours:
$AdminConfig modify $log {{rolloverType TIME} {rolloverPeriod 12} {baseHour 24}}The following example sets the log file to roll over based on both time and size:
$AdminConfig modify $log {{rolloverType BOTH} {rolloverSize 2} {rolloverPeriod 12} {baseHour 24}}
$AdminConfig save