2
votes

I'd like eclipse to output debug level traces for my app and warning level traces for everything else.

Does not matter what I do in my WEB-INF/logging.properties, the only way to control logging level is through "Run" > "Debug Configurations...", select my app, then click on "GWT" tab and change logging level. The problem is that it sets debugging level for all loggers.

Is there a way to make it output debugging messages only for my app?

Here is how my WEB-INF/logging.properties looks like:

java.util.logging.ConsoleHandler.formatter=myproject.LogFormatter

# Set the default logging level for all loggers to WARNING
.level=WARNING

#org.datanucleus.level=WARNING
#org.apache.level=WARNING
#com.google.apphosting.level=WARNING
myproject.level=FINEST

# Set the default logging level for ORM, specifically, to WARNING
DataNucleus.JDO.level=WARNING
DataNucleus.Persistence.level=WARNING
DataNucleus.Cache.level=WARNING
DataNucleus.MetaData.level=WARNING
DataNucleus.General.level=WARNING
DataNucleus.Utility.level=WARNING
DataNucleus.Transaction.level=WARNING
DataNucleus.Datastore.level=WARNING
DataNucleus.ClassLoading.level=WARNING
DataNucleus.Plugin.level=WARNING
DataNucleus.ValueGeneration.level=WARNING
DataNucleus.Enhancer.level=WARNING
DataNucleus.SchemaTool.level=WARNING
1

1 Answers

2
votes

It appears that Google broke logging somewhere around SDK 1.3.7 when they tried to combine the GWT and Appengine loggers. Here's the "Fixed" bug:

http://code.google.com/p/googleappengine/issues/detail?id=4011

Unfortunately they made the situation far worse - it appears there is no way to separate the GWT logging controls from the appengine logging controls, and the GWT logger ignores your logging.properties. The craziest part is that if you have a GAE app without GWT, you have no control over logging whatsoever - you can't set the threshold to DEBUG.

As far as I can tell, we're screwed until this issue gets resolved - and it hasn't even been Acknowledged yet:

http://code.google.com/p/googleappengine/issues/detail?id=4591

Please star that issue and throw tantrums on the appengine-java mailing list :-(