DMS Execution Context Communication

Oracle Dynamic Monitoring Service 6-15 event-route enabled for server AdminServer

6.7.2 Configuring Destinations

DMS offers the following types of destinations: ■ LoggerDestination ■ MBean Creator Destination ■ HTTP Request Tracker Destination ■ JRockit Flight Recorder Destination

6.7.2.1 LoggerDestination

Instances of logger destinations write events to the named logger at a log level of FINER. The loggerName property specifies the name of a logger, but the logger does not necessarily have to be described in logging.xml, though it can be. If the logger name refers to a logger that is explicitly named in logging.xml, then the logger is referred to as a static logger see Section 6.7.2.1.1 . If the logger name refers to a logger that is not explicitly named in logging.xml, then the logger is referred to as a dynamic logger see Section 6.7.2.1.2 . Use in the default configuration : the default configuration defines a logger destination, with an identification of LoggerDestination. This particular instance does not form part of any eventRoute and therefore is not active. It is provided for convenience, and uses a dynamic logger.

6.7.2.1.1 Static Loggers and Handlers Loggers are the objects to which log records are

presented. Log handlers are the objects through which log records are written to log files. For complete control over the log file to which DMS trace data is written, define the logger named in the logger destination in logging.xml. Doing this allows you to explicitly define the name of the log file, the maximum size, format, file rotation and policies. Oracle recommends using commands like the example below to update the configuration. setLogLevellogger=myTraceLogger, level=FINER, addLogger=1; configureLogHandlername=my-trace-handler, addToLogger=[myTraceLogger], path=tmpmyTraceLogFilestrace, maxFileSize=10m, maxLogSize=50m, handlerType=oracle.core.ojdl.logging.ODLHandlerFactory, addHandler=1, useParentHandlers=0; configureLogHandlername=my-trace-handler, Description The LoggerDestination writes each event to the associated logger. Implementing Class oracle.dms.trace2.runtime.LoggerDestination Properties loggerName The name of the ODL logger to which events will be written. 6-16 Oracle Fusion Middleware Performance and Tuning Guide propertyName=useSourceClassandMethod, propertyValue=false, addProperty=1; For more information on logging configuration, see Managing Log Files and Diagnostic Data in the Oracle Fusion Middleware Administrators Guide.] The use of the optional property useSourceClassandMethod set to FALSE prevents the SRC_CLASS and SRC_METHOD from appearing in every message and will marginally improve performance by reducing file output times. For static loggers, consider setting the useParentHandlers parameter to FALSE, otherwise duplicate event messages will be logged to [server]-diagnostics.log, and shown in a log query. See Section 6.7.3, Understanding DMS Event Output for more information about interpreting logger output.

6.7.2.1.2 Dynamic Loggers and Handlers If the named logger has no associated handler

defined in logging.xml, then the logger destination will dynamically create a handler object that will write to a file in the servers default log output directory. Instances of logger destinations write events to the named logger at a log level of FINER. The file name will be the loggers name followed by -event.log. For instance, in the example in Section 6.7.2.1.1 , DMS events would be written to myTraceLogger-event.log.

6.7.2.1.3 Default Locations of the logging.xml File The logging.xml file can typically be

found in one of the following platform locations:

6.7.2.1.4 Using a CLI Command to Query the Trace Log File If the logger destinations

logger and handler are defined in logging.xml then you can take advantage of the displayLogs command to conveniently access logged trace data without having to manually locate or search for it. Examples: ■ To display all the log messages for the myTraceLogger: displayLogsquery=MODULE equals myTraceLogger ■ To display only the log messages for myTraceLogger which have an ECID of 0000HpmSpLWEkJQ6ub3FEH194kwB000004: ddisplayLogsquery=MODULE equals myTraceLogger and ECID equals 0000HpmSpLWEkJQ6ub3FEH194kwB000004 ■ To display only the log messages for myTraceLogger which have an ECID of 0000HpmSpLWEkJQ6ub3FEH194kwB000004 in the last 10 minutes: displayLogsquery=MODULE equals myTraceLogger and ECID equals 0000HpmSpLWEkJQ6ub3FEH194kwB000004, last=10 Platform Server Location Oracle WebLogic Server AdminServer ORACLE_HOMEMiddlewareuser_ projectsdomainsbase_ domainconfigfmwconfigserversAdminSer verlogging.xml WAS ND OracleAdminServer ORACLE_HOMEMiddlewarewas_ profilesDefaultTopologyDefaultServerconfi gcellsDefaultCellnodesstaql11Node02ser versOracleAdminServerfmwconfigwebsphe re-logging.xml