Specifying the Log File Encoding Using WLST

12-26 Oracle Fusion Middleware Administrators Guide

12.6.1.1.2 Writing the Trace Messages to a File Using Fusion Middleware Control You can save

the messages that are in memory to a file by invoking the QuickTrace Dump in Fusion Middleware Control: 1. From the QuickTrace tab of the Log Configuration page, select the handler and click Invoke QuickTrace Dump. The Invoke QuickTrace Dump dialog box is displayed. 2. For Buffer Name, if you have specified user buffers when you configured the QuickTrace handler, select the user, or select Common Buffer for users that you did not specify. If you did not specify any user buffers, the Common Buffer is the only option. 3. Click OK. When the processing is complete, the View Log Messages page is displayed. 4. You can search the messages, as described in Section 12.3.2 , and you can correlate the messages as described in Section 12.5 . In addition, you can download the messages to a file, as described in Section 12.3.3.1 .

12.6.1.2 Configuring and Using QuickTrace Using WLST

You can configure and use QuickTrace Using WLST, as described in the following topics: ■ Configuring QuickTrace Using WLST ■ Writing the Trace Messages to a File Using WLST ■ Disabling QuickTrace Using WLST

12.6.1.2.1 Configuring QuickTrace Using WLST To configure QuickTrace using WLST, you

associate a logger with the QuickTrace handler, using the configureLogHandler command. For example, to associate the oracle.adf logger with the QuickTrace handler and write all TRACE:1 messages to memory: 1. Use the configureLogHandler command to associate the logger with the QuickTrace handler: configureLogHandlername=quicktrace-handler, addToLogger=oracle.adf Handler Name: quicktrace-handler type: oracle.core.ojdl.logging.QuickraceHandlerFactory useLoggingContext: false bufferSize: 5242880 . . . enableUserBuffer: false The messages for the handler are written to a common buffer. You can set additional properties for the QuickTrace handler. For example, to enable user buffers for the users user1 and user2: configureLogHandlername=quicktrace-handler, addToLogger=oracle.adf.faces, propertyName=enableUserBuffer, propertyValue=true, propertyName=reserveBufferUserID, propertyValue=user1, user2 ... Managing Log Files and Diagnostic Data 12-27 Handler Name: quicktrace-handler type: oracle.core.ojdl.logging.QuickTraceHandlerFactory useLoggingContext: false bufferSize: 5242880 . . . reserveBufferUserID: user1, user2 enableUserBuffer: true Messages for user1 and user2 are written to separate buffers. In addition, messages related to other users are written to the common buffer. 2. Set the level of the logger, using the setLogLevel command: setLogLevellogger=oracle.adf, level=TRACE:1 3. Many loggers are associated with other handlers. For example, the oracle.adf logger is associated with the handlers odl-handler, wls-domain, and console-handler. When you set the level of the logger, these handlers will use the same level TRACE:1 for the logger oracle.adf. As a result, much information will be written to the log files, consuming resources. To avoid consuming resources, set the level of the handlers to a lower level, such as WARNING or INFORMATION. For this example, set the level of the three handlers to WARNING:1: configureLogHandlername=odl-handler, level=WARNING:1 configureLogHandlername=wls-domain, level=WARNING:1 configureLogHandlername=console-handler, level=WARNING:1 Note that you should keep the level of the QuickTrace handler at ALL, which is the default.

12.6.1.2.2 Writing the Trace Messages to a File Using WLST You can save the messages to a

file by using the executeDump command. For example: executeDumpname=odl.quicktrace, outputFile=scratchoracle1qt1.dmp The command writes the dump to the specified file. For more information about the executeDump command, see Section 13.4.3.3 . In addition, if an incident is created automatically or manually, the QuickTrace messages are written to dump files in the incident directory. If you enabled user buffers, each user will have one file and the common buffer will have one file. The file names have the following format: odl_quicktracen_iincident_number.username.dmp For example: odl_quicktrace6_i1.weblogic.dmp See Section 13.4.4.1 for information about creating an incident.

12.6.1.2.3 Disabling QuickTrace Using WLST To disable QuickTrace, use the

configureLogHandler command and specify that the level is OFF: configureLogHandlername=quicktrace-handler, level=OFF Handler Name: quicktrace-handler