Tuesday, July 5, 2011

Change the log files location of a WebLogic Domain

In a default WebLogic Domain you can have various WebLogic logfiles located at different locations. For administrators it can be hard to find them all and these log files can have and grow to a large file size which can lead to a full file system. In this blogpost we will move these log files to one location.

For example when we take a look at the logs folder of the AdminServer you will see off course the WebLogic server log called AdminServer.log , the domain log in this case base_domain.log, access.log for the HTTP request logging and the FMW log called AdminServer-diagnostic.log.

At a managed server logs folder location you can also see the server1.out and server1.out00001 log files. These files are created by the NodeManager when we start the Managed servers from the WebLogic Console.

 First let's move the Domain log.

Then change the General log file for all the WebLogic Servers.

Also do this for the HTTP access.log and rename the logfile to servername_access.log else it will conflict with the other servers.

To control the NodeManager standard and error output of the Managed Servers you need set the following weblogic.Stdout weblogic.Stderr parameters. Add these parameters to the argument field of all the managed server which will be started by the NodeManager.

When you enable at least the JRF or the Enterprise Manager option on your domain you need to change the location of the FMW log files. Go the Enterprise Manager Application and select all the Managed Servers.

Click on odl-handler and press the Edit Configuration.

Change the path of the log file.

Now you have one location which contains all the log files.