X

Best Practices from Oracle Development's A‑Team

My "enable debug logging in OAM" WLST script

I was on the phone with someone earlier today and mentioned in passing that I only need to run a simple script to turn debug logging on and off in my little test environment. The silence on the other end of the line told me either he didn't believe me or didn't realize how easy it is to do this sort of thing.

So here it is - enableOAMLogging.py

#!/home/oracle/Oracle/Middleware/Oracle_IAM1/common/bin/wlst.sh connect('weblogic', 'ABcd1234', 't3://localhost:7010') domainRuntime() #Admin server: setLogLevel(logger="oracle.oam.plugin",level="TRACE:32", target="AdminServer", persist="0") setLogLevel(logger="oracle.oam.extensibility",level="TRACE:32", target="AdminServer", persist="0") setLogLevel(logger="com.oracleateam.iam.oamauthnplugin",level="TRACE:32",  target="AdminServer", persist="0",addLogger="1") # OAM server setLogLevel(logger="oracle.oam.plugin",level="TRACE:32", target="oam_server1", persist="0") setLogLevel(logger="oracle.oam.extensibility",level="TRACE:32", target="oam_server1", persist="0") setLogLevel(logger="com.oracleateam.iam.oamauthnplugin",level="TRACE:32",  target="oam_server1", persist="0",addLogger="1") listLoggers(pattern="oracle.oam.*",target="AdminServer") listLoggers(pattern="com.oracleateam.iam.oamauthnplugin",target="AdminServer") listLoggers(pattern="oracle.oam.*",target="oam_server1") listLoggers(pattern="com.oracleateam.iam.oamauthnplugin",target="oam_server1") disableOAMLogging.py is exactly the same except that it has lines like: setLogLevel(logger="oracle.oam",level="", persist="1", target="oam_server1")

Setting level to the empty string toggles logging back to <Inherited>

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha