Oracle WebLogic Server 12c does not provide an out of the box configuration to rotate the STDOUT
and STDERR
logfiles in runtime (.out
file). In the previous recipe, as a workaround, it was redirected to the server logfile and disabled.
Fortunately in Linux, the included logrotate
command-line tool can do the job.
In this recipe, the logrotate
will be configured to run hourly and rotate all .out
files from the PROD_DOMAIN
WebLogic instances larger than 50 MB. It will rotate to the limit of 20 files, repeating the configuration of the server logfiles in the previous recipe.
The logrotate
settings must be configured in the machine shell. To do this log in to the prod01
machine.