Searching Log Files: Advanced Searches This section describes some of the

Managing Log Files and Diagnostic Data 12-15

12.4.1.1 Changing Log File Locations Using Fusion Middleware Control

To change the name and location of a component log file using Fusion Middleware Control: 1. From the navigation pane, select the component. 2. From the dynamic target menu, choose Logs, then Log Configuration. The Log Configuration page is displayed. 3. Select the Log Files tab. 4. In the table, select the log handler and click Edit Configuration. The Edit Log File dialog box is displayed, as shown in the following figure: 5. For Log Path, enter a new path. 6. Click OK. 7. In the confirmation window, click Close.

12.4.1.2 Changing Log File Locations Using WLST

To change the log file location using WLST, use the configureLogHandler command. For example, to change the path of the logger named odl-handler, use the following command: configureLogHandlername=odl-handler, path=scratchOraclelogs

12.4.2 Configuring Log File Rotation

An ODL log is a set of log files that includes the current ODL log file and zero or more ODL Archives segment files that contain older messages. As the log file grows, new information is added to the end of the log file, server_name-diagnostic.log. When the log file reaches the rotation point, it is renamed and a new log file, server_ name-diagnostic.log is created. You specify the rotation point, by specifying the maximum ODL segment size or the rotation time and rotation frequency. Segment files are created when the ODL log file server_name-diagnostic.log reaches the rotation point. That is, the server_name-diagnostic.log is renamed to server_name-diagnostic-n.log, where n is an integer, and a new server_ name-diagnostic.log file is created when the component generates new diagnostic messages. 12-16 Oracle Fusion Middleware Administrators Guide To limit the size of the ODL log, you can specify: ■ The maximum size of the logging directory. Whenever the sum of the sizes of all of the files in the directory reaches the maximum, the oldest archive is deleted to keep the total size under the specified limit. By default, the log files are rotated when they reach 10 MB. The maximum size of all log files for a particular component is 100 MB. ■ The maximum size of the log file. You specify that a new log file be created when a specific time or frequency is reached. The following topics describe how to change the rotation: ■ Specifying Log File Rotation Using Fusion Middleware Control ■ Specifying Log File Rotation Using WLST

12.4.2.1 Specifying Log File Rotation Using Fusion Middleware Control

To configure log file rotation using Fusion Middleware Control for a component: 1. From the navigation pane, select the component. 2. From the dynamic target menu, choose Logs, then Log Configuration. The Log Configuration page is displayed. 3. Select the Log Files tab. 4. In the table, select the logger and click Edit Configuration. The Edit Log File dialog box is displayed. 5. In the Rotation Policy section, you can select one of the following: ■ Size Based: If you select this, enter the following: – For Maximum Log File Size, enter the size in MB, for example, 15. – For Maximum Size of All Log Files, enter the size in MB, for example, 150. ■ Time Based: If you select this, enter the following: – For Start Time, click the calendar and select the date and time when you want the rotation to start. For example, select September 8, 2010 6:00 AM. – For Frequency, you can select Minutes and enter the number of minutes, or you can select Hourly, Daily, or Weekly. – For Retention Period, you can specify how long the log files are kept. You can select Minutes and enter the number of minutes, or you can specify Day, Week, Month, or Year. Specifying a shorter period means that you use less disk space, but are not able to retrieve older information. 6. Click OK. 7. In the confirmation window, click Close. Note: After you change the log file rotation, the configuration is reloaded dynamically. It may take 1 or 2 seconds to reload the configuration.