Enabling stdout logging when running WebLogic Server as a Windows service [ID 858746.1]

  Navigate to the domain directory.

  Run the below command to uninstall the existing Windows services.


uninstallService.cmd "ServiceName"

Output will be as:

C:\BEA\WLS10\user_projects\domains\wls10_domain1>uninstallService.cmd "beasvcwls10_domain1_AdminServer"
C:\BEA\WLS10\user_projects\domains\wls10_domain1>echo off
Stopping beasvc wls10_domain1_AdminServer.
beasvc wls10_domain1_AdminServer stopped.
beasvc wls10_domain1_AdminServer removed.

Open “installService.cmd” file from your domain directory and make the below change for JAVA_OPTIONS.

set JAVA_OPTIONS=-Dweblogic.Stdout="C:\std.out" -Dweblogic.Stderr="C:\std.err"

Once above change is made we will have to install the services again. To reinstall the services, please run the installService.cmd script inside your domain directory and pass the username and password arguments. Below will be the syntax – here username is weblogic and password is also weblogic.

installService.cmd weblogic weblogic

Once you run the above command, you should see this line at the end of the printed output which says installed:

beasvc wls10_domain1_AdminServer installed.

Once you have the services installed, restart the Admin Server from Windows services. After restart you see that std.out and std.err files are created in the C drive

In order to take thread dumps, follow these steps.

Go to your domain directory and run the setEnv.cmd command. Once you run this command, take thread dumps using the weblogic.Admin command line utility. Below is the command:

java weblogic.Admin -url AdminServerListenAddress:PortNo -username weblogic -password Weblogic

Thread dump will be put into std.out file.