Configuring Message Levels Using Fusion Middleware Control

12-24 Oracle Fusion Middleware Administrators Guide ■ Configuring and Using Selective Tracing

12.6.1 Configuring and Using QuickTrace

With QuickTrace, you can trace messages from specific loggers and store the messages in memory. Because QuickTrace logs the messages to memory, it avoids the cost of formatting, string manipulations, and inputoutput operations. As as result, you can enable fine-level application logging for specific loggers without performance overhead. By default, QuickTrace writes the messages to one common buffer. However, you can specify that messages for particular users are written to separate buffers. You can save the messages that are in memory to a file by invoking the QuickTrace Dump in Fusion Middleware Control as described in Section 12.6.1.1.2 or by using the WLST, as described in Section 12.6.1.2.2 . To enable QuickTrace, you create a QuickTrace handler and associate a logger with it. You can specify the buffer size, as well as other attributes, for the handler. Then, you set the level of the amount and type of information to be written by the loggers to memory. The following topics describe how to enable and use QuickTrace: ■ Configuring and Using QuickTrace Using Fusion Middleware Control ■ Configuring and Using QuickTrace Using WLST

12.6.1.1 Configuring and Using QuickTrace Using Fusion Middleware Control

You can configure and use QuickTrace using Fusion Middleware Control, as described in the following topics: ■ Configuring QuickTrace Using Fusion Middleware Control ■ Writing the Trace Messages to a File Using Fusion Middleware Control

12.6.1.1.1 Configuring QuickTrace Using Fusion Middleware Control To configure

QuickTrace using Fusion Middleware Control: 1. From the navigation pane, expand the farm, then WebLogic Domain, and then the domain. Right-click the Managed Server name and choose Logs, then Log Configuration. The Log Configuration page is displayed. 2. Select the QuickTrace tab. 3. Click Create. The Create QuickTrace Handler dialog box is displayed, as shown in the following figure: Managing Log Files and Diagnostic Data 12-25 4. For Name, enter a name for the handler. 5. For Buffer Size, enter the size, in bytes, for the buffer for storing log messages in memory. The default is 5242880. 6. For Maximum Field Length, enter the length, in bytes, for each field in a message. The fields can include the message text, supplemental attributes, and the thread name. The default is 240. An excessively long field for each message can reduce the amount of log records in the buffer. 7. For Handler Level, select the log level for the handler. See Section 12.4.3 for information about the levels. 8. For Loggers to Associate, select the loggers that you want to associate with this QuickTrace handler. All messages of the specified level for these handlers will be written to memory. 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, such as TRACE:1, for the logger, such as 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. 9. Select Enable User Buffer? if you want to enable a user buffer. If you enable this, the handler maintains an individual buffer for each user you specify. Then, for User Names for Reserve Buffer, enter the names of the users, separated by commas. 10. For the remaining options, accept the default values. For information about the options, see ConfigureLogHandler in the Oracle Fusion Middleware WebLogic Scripting Tool Command Reference. 11. Click OK. 12. When the configuration completes processing, click OK. Now, messages of the specified level for the specified loggers are written to memory.