Re: GWT-2.1 && java.util.logging
I didn't read the blog yet, so sorry if this is repeat.. add log4j.properties and commons-logging.properties in the devel mode-only src tree at the root of the src directory (eg dev/src/java) in commons-logging.properties: org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger and for the log4j.properties, use your own normal incantation here's one ripped from somewhere out there: 1log4j.rootCategory=INFO, dest1, dest3 2! Log to the console 3log4j.appender.dest1=org.apache.log4j.ConsoleAppender 4log4j.appender.dest1.layout=org.apache.log4j.PatternLayout 5log4j.appender.dest1.layout.ConversionPattern=%-5p %d{HH:mm:ss.SSS} [%-15.15t] [%-25.25c{1}] %m%n 6! LOG TO A FILE 7log4j.appender.dest3=org.apache.log4j.RollingFileAppender 8log4j.appender.dest3.layout=org.apache.log4j.PatternLayout 9log4j.appender.dest3.layout.ConversionPattern=%-5p %d{EEE MMM dd HH:mm:ss.SSS zzz } [%-15.15t] [%-25.25c{1}] %m%n 10! Specify the file name 11log4j.appender.dest3.File=./logs/hosted-log4j.log 12! Control the maximum log file size 13log4j.appender.dest3.MaxFileSize=3000KB 14log4j.appender.dest3.MaxBackupIndex=3 add your log4j.logger=DEBUG lines here james wrote: Last week I was trying to find a similar example and couldn't. So I took a little time an wrote a quick blog post with a small example app that should help you get started with logging. http://treasonx.blogspot.com/2010/07/gwt-21-logging.html On Jun 21, 3:21 pm, "jie...@gmail.com" wrote: Does anyone have an example of how to get java.util.logging.Logger messages to the console when running in development mode? I was excited about removing an external dependency of gwt-log, but can not seem to get any dev-mode CLIENT log messages to appear to the console.. Complicating matters is that Jetty uses slf4j, which I am fairly unfamiliar with for setting up properly with respect to the appropriate libraries being available. I really just want log messages to go to the console... any information leading to this situation will be rewarded with beer. :-) -Jesse -- Jon Gorrono email{>+[>+++>>+++>+-]>+++.>.<---.>-.+++..---.-.+.>+.<++.<.+.---.>+.<.>---.>>+.<<<.-.>++.} http{ats.ucdavis.edu} -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT-2.1 && java.util.logging
On 07/05/2010 02:48 PM, Thomas Broyer wrote: > > > On 4 juil, 15:19, james wrote: >> Last week I was trying to find a similar example and couldn't. So I >> took a little time an wrote a quick blog post with a small example app >> that should help you get started with logging. >> >> http://treasonx.blogspot.com/2010/07/gwt-21-logging.html > > There's a sample in the SVN repo. Maybe it's even bundled with the M2. > I haven't yet looked at it but I guess it could answer many of your > questions. > http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/logexample/ > Well, that's certainly one example. I was looking for something that would get to the 2.1 stuff from Fred Sauer's logging. Here's what I've found so far: o Using the following idiom in each class that used the FS logger: final private Logger logger; ctor { logger = Logger.getLogger(this.getClass().getName()); } then, where I used Log.debug(msg); // where msg included the class name switch to logger.fine(msg); is a bit verbose in that certain GWT classes are also intruding at the FINE level. I will switch to a different log level. Otherwise, all is copacetic. o Go through /all/ the log handlers and disable the ones you don't want. I forgot SimpleRemoteHandler and it took a few minutes to discover the problem. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT-2.1 && java.util.logging
On 4 juil, 15:19, james wrote: > Last week I was trying to find a similar example and couldn't. So I > took a little time an wrote a quick blog post with a small example app > that should help you get started with logging. > > http://treasonx.blogspot.com/2010/07/gwt-21-logging.html There's a sample in the SVN repo. Maybe it's even bundled with the M2. I haven't yet looked at it but I guess it could answer many of your questions. http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/logexample/ -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT-2.1 && java.util.logging
Last week I was trying to find a similar example and couldn't. So I took a little time an wrote a quick blog post with a small example app that should help you get started with logging. http://treasonx.blogspot.com/2010/07/gwt-21-logging.html On Jun 21, 3:21 pm, "jie...@gmail.com" wrote: > Does anyone have an example of how to get java.util.logging.Logger > messages to the console when running in development mode? I was > excited about removing an external dependency of gwt-log, but can not > seem to get any dev-mode CLIENT log messages to appear to the > console.. > > Complicating matters is that Jetty uses slf4j, which I am fairly > unfamiliar with for setting up properly with respect to the > appropriate libraries being available. I really just want log messages > to go to the console... any information leading to this situation will > be rewarded with beer. :-) > > -Jesse -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.