Application 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.<!>
@rem set environment variable for WebLogic Home
@rem set the environment
@rem Run the Administration Command
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.