views:

556

answers:

3

In Glassfish v2.1 I could look at my web-applications log all stdout and stderr in the glassfish server log ($GF_HOME/domains/domain1/logs/server.log). But I dont see the same in v3. Is there a setting that has to be turned or do applications now have to support their own logging?

+1  A: 

In the v3 environment, System.out and System.err get sent to the log file... via a logger.

The logger's name is "javax.enterprise.system.std.com.sun.enterprise.v3.services.impl".

A message to System.err is logged at Level.SEVERE. A message to System.out is logged at Level.INFO.

You may want to start the server and verify the log level for "javax.enterprise.system" in the admin console. It is the last logger named on the page in this screen shot, right above the 'Save' button. alt text

If this logger is set to OFF, no messages will get to the log file. If the logger is set to SEVERE or WARNING, messages to System.out will not get logged.

EDIT: Added screenshot

vkraemer
I dont see the "javax.enterprise.system.std.com.sun.enterprise.v3.services.impl" logger in my log settings. Do I add this to my logging.properties ? I dont see javax.enterprise.system either but I do see javax.enterprise.system.core .web etc.
ankimal
A: 

I have set the logger level to finest for "javax.enterprise.system" but I dont see any message from System.Out.println(). Please note that the stdout messege is for debuging reason from a primary key class that called and created from application client. any idea?

George Liolios
Unfortunately, I have still not been able to resolve this. None of the settings above have worked.
ankimal
A: 

http://blog.saddey.net/2010/03/27/how-to-deploy-a-grails-application-to-glassfish/

This tutorial very succinctly explained what the problem was and fixes it, at least for grails applications which is primarily what we deploy to glassfish.

ankimal