Searching Log Files: Basic Searches This section describes how to perform

12-14 Oracle Fusion Middleware Administrators Guide For Java components, you can configure the names and locations of log files, the size of the log files, the level of information written to the log files, the format, and the Locale encoding, as described in the following topics: ■ Changing Log File Locations ■ Configuring Log File Rotation ■ Setting the Level of Information Written to Log Files ■ Specifying the Log File Format ■ Specifying the Log File Locale Note the following about using the WLST commands to configure log settings: ■ To use the custom WLST logging commands, you must invoke the WLST script from the Oracle Common home. See Section 3.5.1.1 for more information. ■ The configuration commands, such as setLogLevel, only work in connected mode. That is, you must connect to a running WebLogic Server instance before you invoke the commands. The configuration commands are supported for Java components that run within a WebLogic Server, but are not supported for Oracle WebLogic Server. The configuration commands are not supported for system components. ■ Most of the WLST logging commands require that you are running in the domainRuntime tree. For example, to connect and to run in the domainRuntime tree, use the following commands: .wlst.sh connectusername, password, localhost:port_number domainRuntime ■ The listLoggers, getLogLevel, and setLogLevel commands work in config and runtime mode. In config mode the commands work on loggers that are defined in the configuration file. In runtime mode, the commands work directly with loggers that are defined in the server JVM. By default, the setLogLevel command sets the level on the run-time logger and updates the logger definition in the configuration file. By default, the listLoggers and getLogLevel commands return run-time loggers.

12.4.1 Changing Log File Locations

You can change the name and location of log files by using Fusion Middleware Control or WLST commands, as described in the following topics: ■ Changing Log File Locations Using Fusion Middleware Control ■ Changing Log File Locations Using WLST Note: You cannot configure options for log files of system components, which are listed in Section 3.5.2 , using Fusion Middleware Control. For information about how to configure options for log files for system components, see the Administrators Guide for the component. See Also: Logging Custom WLST Commands in the Oracle Fusion Middleware WebLogic Scripting Tool Command Reference 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.