The first port of call for analyzing most of the issues is log files. Lot of beginners try to resolve an issue by looking at error message generated in application, console etc.That may not give you exact error always. So, it is better to look at log files as they provide lot more information to solve the problem. In this blog, let us look at different log files available in Weblogic/Middleware and how increase log levels. It is good practice is note down all log file locations of systems we are supporting and ways to increase log levels.
Diagnostic Logs: Logs are written using ODL format. Most of the SOA, OSB and other application built on top of weblogic are written to this log file. So, if you are working on any of those products, it is better to look at this log file first. The default log file location is: $DOMAIN_HOME/servers/$SERVER_NAME/logs. If the information written in the logs is not sufficient to anlayze the issue, we can increase logger levels from em console. We can also increase number log files from em console.
To change log level:
Go to EM console -> Right click on soa-infra -> Select Logs -> Log configuration -> change log level. Don’t forget to change log levels back as debug logs quickly fill log files.
To change number diagnostic log files:
em console -> soa_server1 -> Logs -> Log Configuration -> Log Files Tab -> Click on ‘odl-handler’ row -> Click on ‘edit configuration’ -> change size, total size etc. Don’t forget to change logs level on all servers if you have cluster setup.
Selective Tracing: Selective tracing can be used to increase log levels for a particular composite. This will reduce number log entries and make analysis easy. Please refer to Oracle doc id: 1367174.1 for more information.
Server Logs: Weblogic subsystem (JMS, JTA etc) related messages are written to these logs. Log levels can be increased from Admin console.
To change log levels: Admin Console -> Environment -> Servers -> <Server Name> -> Debug
Server Out Logs: All standard out and standard error logs are redirected to this log. Some of the messages are duplicates of server and diagnostic logs. Mostly, I refer to this log file for debugging startup issues.
Domain Logs: Domain log files consolidates log messages from all servers in the domain. It gives high level view. It is located under Admin server log directory.
JMS: JMS related logs can be located at:
$DOMAIN_HOME/servers/<serverName>/logs/jmsservers/<JMSServerName>
access.log: http related logs are written to access log files. Weblogic access log file is located under server log directory mentioned above. OHS servers also have access logs. If weblogic servers are front-ended by OHS, we need to check these logs as well. This files are located under ohs server log directory.
Incidents: Oracle Diagnostic Framework (DFW) generates incidents whenever a certain condition is met. Weblogic comes with Out of the Box watchers like Stuck Thread, DeadLock, UnhandledException etc. It generates lot of useful information like logs around the incident, jvm threads, composite causing stuck thread etc. Incident directory is located at:
$DOMAIN_HOME/servers/<ServerName>/adr/diag/ofm/<domainName>/<serverName>
OWSM: OWSM log policy can be used to capture whole SOAP message including headers. This will be helpful to see the original message being sent to SOA and final message sent out of SOA. Procedure to capture SOAP messages:
i) Log into em console and go to the service for which soap message has to be captured.
ii) Go to ‘Policies’ tab
iii) Click on ‘Attach To/Detach From’
iv) From drop down and select the service/reference.
v) Select ‘Name’ from ‘Search’ drop down and enter ‘log’ in search text box and enter.
v) oracle/log_policy is displayed. Select that and attach.
vi) Click on ‘OK’ present at the top.
vii) SOAP messages are written to: $DOMAIN_HOME/domain_name/servers/mserver_name/logs/owsm/msglogging/diagnostic.log
Comments
Post a Comment