Saturday, February 23, 2019

How To Enable TRACE Logging For OAM 11g Server and 10g or 11g WebGate ?

Setting OAM 11g Logger Levels


The following steps assume the name of the OAM Managed Server is 'oam_server1', replace accordingly.

1. Navigate to the OAM $ORACLE_HOME and execute the wlst.sh script in $ORACLE_HOME/common/bin

Example path: /home/Middleware/Oracle_IDM1/common/bin

$ORACLE_HOME/common/bin/./wlst.sh
Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands
2. Connect to the WebLogic Admin Server as the WebLogic Administrator

wls:/offline> connect()
Please enter your username :weblogic
Please enter your password :
Please enter your server URL [t3://localhost:7001] :
Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.
3. Set the logger level of the OAM Managed Server (e.g. oam_server1) to TRACE:32 with persist="0".

wls:/base_domain/serverConfig> domainRuntime()
wls:/base_domain/domainRuntime> setLogLevel(logger="oracle.oam", target="oam_server1", level="TRACE:32", persist="0")

Note: Use persist="1" to enable the log level to "persist" after OAM Managed Server restarts.
4. Verify the logger level was set by listing the current value and checking the OAM Managed Server log contains "TRACE:32".

wls:/base_domain/domainRuntime> listLoggers(pattern="oracle.oam", target="oam_server1")
-----------+-----------------
Logger | Level
-----------+-----------------
oracle.oam | TRACE:32

grep -m 1 -o 'TRACE:32' $DOMAIN_HOME/servers/oam_server1/logs/oam_server1-diagnostic.log

Expected Output:
TRACE:32

5. To return the OAM Managed Server to the default logger level use the following setLogger command or restart the Managed Server.

wls:/base_domain/domainRuntime> setLogLevel(logger="oracle.oam", target="oam_server1", level="NOTIFICATION:1", persist="0")

Setting 11g WebGate Logger Levels

Configuring Different Threshold Levels for Different Types of Data

1. Backup the following file: $MW_HOME/$ORACLE_WEBTIER/instances/<instance>/config/OHS/<ohs_instance>/webgate/config/oblog_config_wg.xml

Example path: /refresh/home/Middleware/Oracle_WT1/instances/instance1/config/OHS/ohs1/webgate/config/oblog_config_wg.xml

2. In the original oblog_config_wg.xml change Value from "LOGLEVEL_WARNING" to "LOGLEVEL_TRACE".

<NameValPair
        ParamName="LOG_THRESHOLD_LEVEL"
        Value="LOGLEVEL_TRACE">
</NameValPair>
In the same file change the BUFFER_SIZE Value to "4" so that WebGate log entries are flushed to file promptly.

<NameValPair
        ParamName="BUFFER_SIZE"
        Value="4">
</NameValPair>

Note: Do not modify any other LOGLEVEL settings in oblog_config_wg.xml.

3. The log level change may take a couple of minutes to be reflected in the logs, restarting the WebServer is not necessary.

4. To disable the WebGate TRACE logging simply replace the original oblog_config_wg.xml file with backup taken in Step 1.

Setting 10g WebGate Logger Levels

1. Backup the following file: $WEBGATE_HOME/access/oblix/config/oblog_config_wg.xml

Example path: /refresh/home/OAM10wg/access/oblix/config

2. In the original oblog_config_wg.xml change Value from "LOGLEVEL_WARNING" to "LOGLEVEL_TRACE".

<NameValPair
        ParamName="LOG_THRESHOLD_LEVEL"
        Value="LOGLEVEL_TRACE">
</NameValPair>
In the same file change the BUFFER_SIZE Value to "4" so that WebGate log entries are flushed to file promptly.

<NameValPair
        ParamName="BUFFER_SIZE"
        Value="4">
</NameValPair>
Note: Do not modify any other LOGLEVEL settings in oblog_config_wg.xml.

3. The log level change may take a couple of minutes to be reflected in the logs, restarting the WebServer is not necessary.

4. To disable the WebGate TRACE logging simply replace the original oblog_config_wg.xml file with backup taken in Step 1.

Regardes,
Arihant

3 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. The Internet is amplifying existing markets by slicing through a considerable lot of the circulation and advertising hindrances that can keep firms from accessing remote markets. VPN

    ReplyDelete
  3. I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much. www.trace-phonenumber.com

    ReplyDelete