Book Image

Oracle WebLogic Server 12c Advanced Administration Cookbook

By : Dalton Iwazaki
Book Image

Oracle WebLogic Server 12c Advanced Administration Cookbook

By: Dalton Iwazaki

Overview of this book

Table of Contents (15 chapters)
Oracle WebLogic Server 12c Advanced Administration Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 steps to rotate the .out file:

  1. Log in as a wls user to shell and create a new file wls-stdout-logrotate.conf and save it to the $DOMAIN_HOME folder:

    [wls@prod01]$ cd /oracle/Middleware/user_projects/domains/PROD_DOMAIN
    [wls@prod01]$ vi wls-stdout...