My Oracle Support Banner

How to Redirect WLST stdout to a Specified File (Doc ID 1344154.1)

Last updated on SEPTEMBER 27, 2020

Applies to:

Oracle WebLogic Server - Version 10.0 and later
Information in this document applies to any platform.

Goal

The customer runs script like the following:

def checkHealth(AdminServer):
 connect('username','password','t3://host:port')
 redirect('./logs/wlst.log')
 domainRuntime()
 cd('ServerLifeCycleRuntimes')
 cd(serverName)
 status = cmo.getState()
 print "Status of Managed Server is " + status
 stopRedirect()

if __name__== "main":
  checkHealth('AdminServer')

But the output of print "Status of Managed Server is " + status can't be redirected to the log file as expected.

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.