In hosted mode, GWT redirects all the logging calls made with commons-logging to its own "TreeLogger", so that any useful logs emitted server-side are redirected to it (and most likely lost). Not only is this annoying, it also breaks the expected consistency with the normal deployment state.
Technically, the GWT makes a System.setProperty("org.apache.commons.logging.Log", adapterClassName) call. Fortunately, the apache commons logging library preempts this setting with its own configuration file.
Just create a file called "commons-logging.properties" at the root of your classpath, and add the following line:
[to use the Log4j backend]
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
[to use the JDK14 backend]
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
[to use the SimpleLog backend]
org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
etc. well, you got it.
(OK, the title of this article is misleading, we're not really asking the GWT to not redirect, but rather asking commons-logging to ignore the GWT request)
I just finished reading an article comparing GWT-EXT and EXT-GWT, it was a few minutes ago, and now I can't even remember which is which. I don't know which was created first, and really I don't care, but there's something obvious that should cross the mind of anyone: when there's already a project called X-Y, don't call yours Y-X. That's utterly lame.
I don't know who exactly, but someone out there is a total moron. Or totally lacks imagination. Or both.
Recent comments