Tuesday, February 12, 2013

How to enable System.out.println messages in Weblogic server

Hi,

Using System.out.println is common practice to debug issues in Java applications. However, in ADF applications using ADF logger is common and best practice. But if we have some web services/ java apps deployed on weblogic server mostly it will use System.out.println

By default Weblogic server does not display the standard System.out.println messages. To enable those go to weblogic console http://<server-name>:port/console

Click Domain Name > Environments > Servers  > <Server-name> > Logging  and check the following options under Advanced option



Restart the specific managed server and now the System.out.println messages will be visible on the ServerName.log file which is commonly under domain_directory/servers/<server-name>/logs

Cheers,
Zeeshan Baig

2 comments:

  1. Yes, but I'm trying to get out of the habit of using System.out.println for debugging. I really want to use the ADF logger. Especially because I can change the logging level - set it to only show serious errors during normal production, show details when something is wrong, or during development.

    ReplyDelete
    Replies
    1. Yes but we all love System.out.println LOL.

      I am debugging some Web service at the moment and had to do this ;)

      Zeeshan

      Delete