Thursday, May 30, 2013

Re: GWT Logging



On Thursday, May 30, 2013 9:33:55 AM UTC+2, Vikas Pandit wrote:
Hi All, 
How can i write log message in a file (/WEB-INF/logs) in GWT? it seems log4j is not supported but then i wrote a servlet (to be loaded when application starts to load my custom "logging.properties"(from /WEB-INF/classes/logging.properties) file and load it into java.util.LogManager but i get below error 

java.lang.NoClassDefFoundErrorjava.util.logging.LogManager is a restricted class. Please see the Google App Engine developer's guide for more details. 

my point here is to write log messages into a file under /WEB-INF/logs. 

If you're using AppEngine (and intend in deploying to AppEngine), then I think you'll have to use java.util.logging and the logs will go to the AppEngine console (I never used AppEngine so this is just a guess).

As you say you want to write to WEB-INF/logs, I'll take it that you don't want to deploy to AppEngine, in which case I think you mistakenly enabled AppEngine for your project in Eclipse? You can disable it from the project's properties.

Note that writing to WEB-INF/logs won't work in some servlet containers if you use a WAR file (some servers won't unpack your WAR file, or will unpack them in a temporary folder).

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment