7 Configuring and Monitoring Log Files
This chapter describes how to monitor your Oracle Service Bus services using diagnostic log files. Service Bus logging is based on Oracle Diagnostic Logging (ODL).
This chapter includes the following sections:
For information about ODL and diagnostic log files, see Managing Log Files and Diagnostic Datain Administering Oracle Fusion Middleware.
7.1 Introduction to Oracle Service Bus Logging
Service Bus components generate log files containing messages that record all types of events, including startup and shutdown information, errors, warning messages, access information on HTTP requests, and additional information.
Service Bus uses Oracle Diagnostic Logging (ODL) to define the standard format, content, and file-handling of diagnostic log files. In addition to logging standard actions, Service Bus adds entries to the diagnostic log file for any pipelines and split-joins that have log actions and that have logging enabled.
ODL allows you to limit the amount of diagnostic information saved, including the maximum log file size. It provides several log handlers to manage log messages for individual product components, and also provides a standard log message format.
7.1.1 ODL Log Files
The ODL framework writes diagnostic log messages to domain_name
/servers/
server_name
/logs/
server_name
-diagnostic.log
This file is the default log file for all ODL loggers. You can create new log files and change the location of the log files. Once a log file reaches a specified size, it is renamed and a new log file is created. Once total log file storage reaches a specified size, the oldest log file is removed.
7.1.2 ODL Logging Levels
The ODL logging level specified for a log handler determines the amount of information written to the log files. Log levels include a message type and a message level. Enabling logging at a specific level also enables logging at all higher levels.
The following message types are defined for ODL:
-
INCIDENT_ERROR
-
ERROR
-
WARNING
-
NOTIFICATION
-
TRACE
The message level further qualifies the message type, indicating the degree of severity of the message. The value is an integer from 1, indicating the highest severity, to 32, indicating the lowest severity. The message type and level together then map to levels defined in java.util.logging.Level
. For example, TRACE:32
maps to FINEST
, NOTIFICATION:1
maps to INFO
. Fusion Middleware
Control displays the mapping on the Log Configuration page.
Logging levels are described in greater detail in "Setting the Level of Information Written to Log Files" in Administering Oracle Fusion Middleware.
7.1.3 ODL Message Format
All products write ODL log messages in a standard format for easier readability. The format is:
[timestamp] [component id] [messagetype:level] [message-id] [module id] ([field-name: field-value])* message-text [supplemental-detail]
For more information about the log entry format, including descriptions of all message components, see "Understanding ODL Messages and ODL Log Files" in Administering Oracle Fusion Middleware.
7.1.4 ODL Log Configuration
You can configure the ODL log files and log levels using Fusion Middleware
Control, WLST commands, or by modifying logging.xml
directly (the last method is not recommended). When you update the log configuration, the changes take effect immediately with no server restart required. Using Fusion Middleware
Control or WSLT commands, you can view and search log files, create new log files, change the location of log files, change the severity of each logger, and so on.
The logging.xml
file is located in domain_name
/config/fmwconfig/servers/
server_name
. By default, there are no logger entries in this file specific to Service Bus, so if you choose to modify logging using this method, you need to add in the Service Bus loggers manually. For lists of loggers, see Oracle Service Bus Loggers.
7.1.5 Oracle Service Bus Loggers
Service Bus includes a variety of loggers to handle messages for various modules. These loggers are all located in the oracle.osb parent logger. You cannot configure the oracle.osb logger; it inherits its configuration from the oracle parent logger. You can view and configure these loggers in Fusion Middleware Control or using WLST commands.
For a complete list of Service Bus loggers, see Oracle Service Bus Loggers.
Note:
Service Bus provides debug loggers in the oracle.osb
parent logger for backwards compatibility only.
7.2 Configuring Diagnostic Logging for Oracle Service Bus
The easiest ways to configure the Service Bus loggers are using Fusion Middleware Control or using WLST commands.
7.2.1 About Service Bus Logging in Fusion Middleware Control
The Log Levels tab on the Log Configuration page in Fusion Middleware Control displays the following information:
-
A View list for selecting the type of loggers for which to view information. Choose from runtime or persistent state loggers.
-
A table that displays the logger name, the Oracle Diagnostic Logging (ODL) level for setting the amount and type of information to write to a log file, the log file, and the log level state.
The Log Files tab displays the log handlers, the log file paths and names, the format of the log messages, the rotation policies used, and other parameters based on the log file configuration class.
7.2.2 Configuring Log Levels and Log Files for Service Bus
You configure log levels and log files for Service Bus using Fusion Middleware Control.
To configure log levels and log files:
7.2.3 Configuring Oracle Service Bus Logging using WLST Commands
WLST provides commands for updating the logging configuration for a single server. For information about these commands and how to use them, see "Configuring Settings for Log Files" in Administering Oracle Fusion Middleware. A reference of WLST logging commands is provided in "Logging Custom WLST Commands" in WLST Command Reference for Infrastructure Components.
7.2.4 Setting Logging Levels for Debugging in Fusion Middleware Control
Although debugging should be disabled during normal Service Bus operation, you may find it helpful to specify debug logging for specific modules while you are developing and experimenting with your solution. For example, you may want to turn on the alert debugging flag when you are developing alerts and want to investigate how the alert engine works.
For more information about debugging Service Bus services, see "Using the Oracle Service Bus Debugger" in the Developing Services with Oracle Service Bus.
To set logging levels for debugging:
7.2.5 Setting the Prefix for Oracle Service Bus Error Messages
Service Bus generates message IDs prefixed by "OSB" followed by a dash and a 6-digit number; for example, OSB-381202
. Previous versions of Service Bus prefixed log messages with "BEA" instead. If you monitor log files or services using third-party tools that expect to find "BEA" in log messages and SOAP faults, those tools may no longer work as expected.
To continue using the "BEA" prefix in Service Bus messages, set the following system property at runtime:
-Dcom.oracle.sb.MsgIdPrefixCompatibilityModeEnabled=true
You can set this property in the WebLogic Server Administration Console on the Configuration > Server Start page for the Service Bus server.
7.2.6 Configuring Oracle Service Bus for Offline Logging
When you are working with Service Bus offline instead of running in an application server, the logging environment is not automatically configured. To configure offline logging, you need to configure the logging.xml
file manually and set the following two system properties:
-Djava.util.logging.config.class=oracle.core.ojdl.logging.LoggingConfiguration
-Doracle.core.ojdl.logging.config.file=logging.xml
logging.xml
is the path and name of the logging.xml
file that you configured for offline logging.
7.3 Viewing Diagnostic Log Files for Oracle Service Bus
You can view log files using Fusion Middleware
Control or the WLST displayLogs
command.
You can download log files to your local client and view them using another tool; for example, a text editor or another file viewing utility.
7.3.1 Viewing Oracle Service Bus Log Files in Fusion Middleware Control
For more information about viewing server and domain log files in Fusion Middleware Control, see "Viewing and Searching Log Files" in Administering Oracle Fusion Middleware.
To view Service Bus log messages:
7.3.2 Customizing the Log Message View
The View menu above the log file entries lets you select which columns to display and in what order. You can also define how to sort the displayed messages.
To customize the view of log messages:
-
To select additional columns to display for each message, do the following:
-
Click the View menu, point to Columns, and then select a column name to display.
-
Repeat the above step for each column to display.
-
-
To remove columns from the table, do the following:
-
Click the View menu, point to Columns, and then deselect a column name to remove it.
-
Repeat the above step for each column to remove.
-
-
To define how messages are sorted in the list, do the following:
-
Click the View menu, point to Sort, and then select Advanced.
The Advanced Sort dialog appears, where you can sort by up to three columns.
-
Select the first column to sort by and whether to sort in ascending or descending order.
-
Repeat the above step for any additional columns to sort by, and then click OK.
-
-
To display columns in a different order, do the following:
-
Click the View menu and select Reorder.
The Reorder Columns dialog appears.
-
Select a column to reorder and then move it up or down in the list using the arrow buttons on the right.
-
Repeat the above step for any additional columns to move, and then click OK.
-
7.3.3 Viewing Oracle Service Bus Log Files Using WLST Commands
WLST provides commands for searching and viewing log messages. For information about these commands and how to use them to view log files, see "Viewing Log Files and Their Messages Using WLST" in Administering Oracle Fusion Middleware. For a reference of WLST logging commands, see "Logging Custom WLST Commands" in WLST Command Reference for Infrastructure Components.
7.4 Oracle Service Bus Loggers
These list the standard loggers provided with Service Bus and list the debug loggers along with their correspondence to the debug loggers from the previous version.
This section contains the following topics:
7.4.1 Service Bus Standard Loggers
The standard loggers provided with Service Bus are listed below.
-
oracle.osb.configfwk
-
oracle.osb.mgmt.view.resequencer.ServiceNamesLovModel
-
oracle.osb.fmwemplugin.core
-
oracle.osb.mgmt.view.resource.ResourceMetricsDetailsViewHandler
-
oracle.osb.mgmt.base.OSBContext
-
oracle.osb.mgmt.view.util.AdfUtil
-
oracle.osb.mgmt.model.OSBModel
-
oracle.osb.owsm.resource.owsm
-
oracle.osb.mgmt.model.monitor.alerts.AlertsHistoryModel
-
oracle.osb.resources.core.resourcemanagement
-
oracle.osb.mgmt.model.monitor.metrics.ServiceMetricsHelper
-
oracle.osb.security.api.security
-
oracle.osb.mgmt.model.monitor.metrics.ServiceMetricsModel
-
oracle.osb.services.core.initialization
-
oracle.osb.mgmt.model.operations.global.GlobalOperationalSettingsModel
-
oracle.osb.statistics.alsbstatistics
-
oracle.osb.mgmt.model.resequencer.ResequencerModel
-
oracle.osb.transports.dsp.dsptransportmessages
-
oracle.osb.mgmt.model.resource.ResourceMetricsDetailsModel
-
oracle.osb.transports.jca
-
oracle.osb.mgmt.model.resource.ResourceOperationalSettingsModel
-
oracle.osb.transports.mq.mqtransport
-
oracle.osb.mgmt.model.resource.Service
-
oracle.osb.uddi.services.uddiconfiguration
-
oracle.osb.mgmt.model.resource.businessService.BusinessService
-
oracle.soa.resequencer.OSB
-
oracle.osb.mgmt.model.resource.pipeline.Pipeline
-
oracle.soa.resequencer.OSB.container
-
oracle.osb.mgmt.model.resource.proxyService.ProxyService
-
oracle.soa.resequencer.OSB.dao.toplink.service
-
oracle.osb.mgmt.model.resource.splitJoin.SplitJoin
-
oracle.soa.resequencer.OSB.dao.toplink.sessi
-
oracle.osb.mgmt.model.util.DateUtil
-
oracle.soa.resequencer.OSB.infra.deployment
-
oracle.osb.mgmt.model.util.JMXUtil
-
oracle.soa.resequencer.OSB.management
-
oracle.osb.mgmt.view.common.query.SavedSearchDefinition
-
oracle.soa.resequencer.OSB.service
-
oracle.osb.mgmt.view.monitor.alerts.AlertsHistoryViewHandler
-
oracle.soa.resequencer.OSB.service.event
-
oracle.osb.mgmt.view.monitor.metrics.ServiceMetricsViewHandler
-
oracle.soa.resequencer.OSB.threadpool
-
oracle.osb.mgmt.view.operations.global.GlobalOperationalSettingsViewHandler
-
oracle.soa.resequencer.OSB.utils
-
oracle.osb.mgmt.view.resequencer.ResequencerViewHandler
7.4.2 Service Bus Debug Loggers in 11g and 12c
The following table shows the mapping between the debug loggers previously configured in alsbdebug.xml
and configfwkdebug.xml
, along with the new ODL debug logger names.
Note:
The debug loggers listed in the following table are included for backwards compatibility only, and will be deprecated in later releases.
Table 7-1 Service Bus Debug Loggers in 11g and 12c
12c Log Handler | 11g Log Handler | Description |
---|---|---|
oracle.osb.debug.alert-manager |
alsb-alert-manager-debug |
Prints an evaluation of alerts. |
oracle.osb.debug.bpel |
alsb-bpel-debug |
|
oracle.osb.debug.codec |
alsb-codec-debug |
|
oracle.osb.debug.configfwk.component |
config-fwk-component-debug |
Logs low level debug information about create, update, delete, and import operations. |
oracle.osb.debug.configfwk.core |
config-fwk-debug |
Logs information on general aspects of Service Bus configuration. |
oracle.osb.debug.configfwk.deployment |
config-fwk-deployment-debug |
Logs debug information on session creation, activation, and distribution of configuration in a cluster. |
oracle.osb.debug.configfwk.persistence |
config-fwk-persistence-debug |
|
oracle.osb.debug.configfwk.security |
config-fwk-security-debug |
Logs debug information on encryption and decryption during importing and exporting. |
oracle.osb.debug.configfwk.transaction |
config-fwk-transaction-debug |
Logs low-level debug information about changes made to in-memory data structures and files. This debug flag also generates server startup recovery logs. |
oracle.osb.debug.configfwk.validation |
config-fwk-validation-debug |
|
oracle.osb.debug.console |
alsb-console-debug |
|
oracle.osb.debug.custom-resource |
alsb-custom-resource-debug |
Logs information on custom resources. |
oracle.osb.debug.debugger |
alsb-debugger-debug |
|
oracle.osb.debug.flow-deployment |
alsb-flow-deployment-debug |
|
oracle.osb.debug.flow-resource |
alsb-flow-resource-debug |
Logs information on errors generated in split-joins. |
oracle.osb.debug.flow-transports |
alsb-flow-transport-debug |
|
oracle.osb.debug.jca-framework-adapter |
alsb-jca-framework-adapter-debug |
|
oracle.osb.debug.jms-reporting-provider |
alsb-jms-reporting-provider-debug |
Logs information on the out of the box, JMS-based reporting provider. |
oracle.osb.debug.management |
alsb-management-debug |
Logs information on user and group management in the console. |
oracle.osb.debug.management-dashboard |
alsb-management-dashboard-debug |
|
oracle.osb.debug.message-tracing |
alsb-message-tracing-debug |
Logs message tracing information. |
(not in 12c) |
alsb-monitoring-aggregator-debug |
No longer used. |
oracle.osb.debug.monitoring |
alsb-monitoring-debug |
Logs information on the statistics system. |
oracle.osb.debug.mqconnection |
alsb-mqconnection-debug |
Logs information on MQ connection resources. |
oracle.osb.debug.pipeline |
alsb-pipeline-debug |
Logs information on errors generated in pipelines. |
oracle.osb.debug.proxy-server-manager |
alsb-proxy-server-manager-debug |
Logs information on proxy servers. |
oracle.osb.debug.resequencer |
Logs information on message resequencing. |
|
oracle.osb.debug.result-caching |
alsb-result-caching-debug |
Logs information on business service result caching. |
oracle.osb.debug.security-module |
alsb-security-module-debug |
|
oracle.osb.debug.security-wss |
alsb-security-wss-debug |
|
oracle.osb.debug.security-wss-owsm-debug |
alsb-security-wss-owsm-agent-debug |
|
oracle.osb.debug,security-wss-owsm |
alsb-security-wss-owsm-debug |
|
(not in 12c) |
alsb-security-wss-owsm-pm-debug |
No longer used. |
oracle.osb.debug.service-account-manager |
alsb-service-account-manager-debug |
Logs information on service accounts. |
oracle.osb.debug.service-binding-layer |
alsb-service-binding-layer-debug |
|
oracle.osb.debug.service-provider-manager |
alsb-service-provider-manager-debug |
Logs information on service providers. |
oracle.osb.debug.service-repository |
alsb-service-repository-debug |
Logs information on various service-related configuration operations. |
oracle.osb.debug.service-security-manager |
alsb-service-security-manager-debug |
Logs information on access control. |
(not in 12c) |
alsb-service-validation-debug |
No longer used. |
oracle.osb.debug.sources |
alsb-sources-debug |
|
oracle.osb.debug.stages-transform-runtime |
alsb-stages-transform-runtime-debug |
Logs information on transaction related actions. |
oracle.osb.debug.test-console |
alsb-test-console-debug |
Logs information on test console activities. |
oracle.osb.debug.throttling |
alsb-throttling-debug |
Logs information on the throttling feature. |
oracle.osb.debug.transports |
alsb-transports-debug |
Logs transport-related debug information, including transport headers, printed per-message. |
oracle.osb.debug.uddi |
alsb-uddi-debug |
Logs information on UDDI registries. |
oracle.osb.debug.wadl-repository |
NA |
Logs information on WADL related configuration operation. |
oracle.osb.debug.ws-policy |
alsb-wspolicy-repository-debug |
Logs information on WS policy. |
oracle.osb.debug.wsdl-repository |
alsb-wsdl-repository-debug |
Logs information on WSDL-related configuration operation. |
7.5 Log Configuration After Upgrading from 11g
When upgrading from Oracle Service Bus 11g, the upgrade process removes the alsbdebug.xml
file. If the server was previously configured to enable debug logging through alsbdebug.xml
, you need to reconfigure logging to enable debug logging again.
Table 7-1 lists the new loggers to use.
In addition, Service Bus now writes log entries to the diagnostic log file instead of the server log file, so any custom tools used to inspect the log files in version 11g need to be updated. The old file name is server_name
.log
; the new file name is server_name
-diagnostic.log
.
7.5.1 Logging Levels
Upgrading Service Bus from 11g automatically updates the logging levels in existing Service Bus log messages. The following table describes how the previous log levels map to the new log levels.
Table 7-2 Mapping of 11g Log Levels to 12c
WLS Severity | ODL Message Type: Message Level | Integer value |
---|---|---|
trace |
TRACE:32 |
295 |
debug |
TRACE:1 |
500 (Level.FINE) |
info |
NOTIFICATION:1 |
800 (Level.INFO) |
notice |
WARNING:7 |
880 |
warning |
WARNING:1 |
900 (Level.WARNING) |
error |
ERROR:1 |
1000 (Level.SEVERE) |
critical |
INCIDENT_ERROR:24 |
1030 |
alert |
INCIDENT_ERROR:14 |
1060 |
emergency |
INCIDENT_ERROR:4 |
1100 |
7.5.2 Log Message Formatting
Logging with ODL means that log messages are formatted differently than in previous versions. The new format is:
[timestamp] [component id] [messagetype:level] [message-id] [module id] ([field-name: field-value])* message-text [supplemental-detail
Table 7-3 shows how previous versions of Service Bus log messages map to the new ODL format. For more information about the log message format, see "Understanding ODL Messages and ODL Log Files" in Administering Oracle Fusion Middleware.
Table 7-3 Message Format Mapping to ODL
WebLogic Server Format | ODL Format |
---|---|
Timestamp |
Timestamp |
Severity |
Message Type:Level |
Subsystem |
NA |
Hostname |
Field-name:field-value (Host ID) |
Server Name |
Component ID |
Thread |
Field-name:field-value (Thread ID) |
User ID |
Field-name:field-value (User ID) |
Transaction ID |
NA |
Diagnostic Context ID |
Field-name:field-value (Execution Context ID) |
Raw Time Value |
NA |
Message ID |
Message ID |
Message Text |
Message Text |