Rotating the STDOUT logfile

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.

Getting ready

The logrotate settings must be configured in the machine shell. To do this log in to the prod01 machine.

How to do it...

Carry out the following ...

Get Oracle WebLogic Server 12c Advanced Administration Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.