Suppressing Weblogic Script Tool Output
Hello,
I am creating a python script that is used to determine the status of a specific server, based on the servers health (OK, degraded, etc.) and state (Running, Shutdown, etc.). The script is designed to return a 0 if the server is Healthy and Running and a 1 otherwise. However, the WLST (Weblogic Scripting Tool) is used and outputs unneeded information as shown below:
Initializing WebLogic Scripting Tool (WLST) ... -UNNEEDED
Welcome to WebLogic Server Administration Scripting Shell -UNNEEDED
Type help() for help on available commands -UNNEEDED
0 -NEEDED
The parts in bold show what I need and don't need to be printed to the console. The only part I explicitly tell the program to print is the status code (0 in this case). I found a page that said to use redirect('/dev/null', 'false') to suppress the WLST output. I placed this line at the beginning of the script and was able to suppress some of the WLST output....but the 3 unneeded lines above still keep printing. How do I go about stopping these three lines from showing?
I am creating a python script that is used to determine the status of a specific server, based on the servers health (OK, degraded, etc.) and state (Running, Shutdown, etc.). The script is designed to return a 0 if the server is Healthy and Running and a 1 otherwise. However, the WLST (Weblogic Scripting Tool) is used and outputs unneeded information as shown below:
Initializing WebLogic Scripting Tool (WLST) ... -UNNEEDED
Welcome to WebLogic Server Administration Scripting Shell -UNNEEDED
Type help() for help on available commands -UNNEEDED
0 -NEEDED
The parts in bold show what I need and don't need to be printed to the console. The only part I explicitly tell the program to print is the status code (0 in this case). I found a page that said to use redirect('/dev/null', 'false') to suppress the WLST output. I placed this line at the beginning of the script and was able to suppress some of the WLST output....but the 3 unneeded lines above still keep printing. How do I go about stopping these three lines from showing?
0