Set log levels using WLST

Set log levels using WLST

Setting Fusion Middleware log levels is easily done on the EM Console. But there may be a need to script this instead.

Using WLST to set log levels:

Connect to WLST and get the runtime information:

export MW_HOME=/u01/oracle/middleware
cd $MW_HOME/oracle_common/common/bin
./wlst.sh
connect('weblogic','Welcome1','t3://soadev:7001')
domainRuntime()

List the existing loggers and their log levels:

listLoggers()

View the log level of a particular logger (e.g., oracle.soa.bpel):

getLogLevel(target='soa_server1',logger='oracle.soa.bpel')

Set the desired log level:

setLogLevel(target='soa_server1',logger='oracle.soa.bpel',level='TRACE:16',persist='0')

Log levels:

Check out Setting the Level of Information Written to Log Files:

Example: