WebLogic: Getting Standard Error Into A File

2019-09-18 18:09发布

问题:

I'm using WebLogic 9.2. I found an option in the Admin Server web page to send standard out to the server log files. I would like the same for standard error, but I can't find an option for it in the Admin Server web page. I haven't found Oracles documentation very clear. Do I need to set this option by hand in a config file somewhere and if so where and how? Thanks in advance

回答1:

If you are using 'RedirectStdoutToServerLogEnabled' feature as described in http://download.oracle.com/docs/cd/E13222_01/wls/docs90/ConsoleHelp/taskhelp/logging/RedirectJVMOutput.html it will redirect both stdout and stderr to the server logs

WebLogic also supports -Dweblogic.stdout=/tmp/mystdout.log & -Dweblogic.stderr=/tmp/mystderr.log properties which you can pass in when starting the server. However note that there is no log rotation for such logs.