Weblogic Command to Bounce PoolApplication Server logs are very critical for developers to debug and find issues. However due to security policies developers may not have direct access to these logs. However weblogic server provides a command through which the server log can be spooled to the local system. The input to this command is security username and password along with the location of the file where the log needs to be spoooled into.<!>

The Script

echo off
@rem set environment variable for WebLogic Home
set WL_HOME=f:beaweblogic81
@rem set the environment
call %WL_HOME%serverbinsetWLSEnv.cmd

@rem Run the Administration Command
echo off
java weblogic.Admin -url t3://localhost:7001 -username %1 -password %2 SERVERLOG > %3

@rem echo off
echo ERRORLEVEL =  %ERRORLEVEL%
if %ERRORLEVEL%== 0 (
echo Logs retrieval SUCCESSFUL.
) else (
echo echo Logs retrieval FAILED.
del %3.
)