Hi All, I went down this course and pretty much knocked it out (it also works on J2ME). With one cavaet you need to fetch your log instances in member methods. http://cvs.adligo.org/viewvc/ i_log project depends on i_util and gwt_util for gwt runtime See the dist package for compiled code
and some examples http://www.adligo.com/products.htm Cheers i buy into commons logging!, Scott On Jul 15, 12:42 pm, jarrod <[EMAIL PROTECTED]> wrote: > Fred, and all, > > I put up my first version of a GWT port of CommonsLogging: > > http://www.assembla.com/wiki/show/mkdev/GWT_Commons_Logging > > No, it isn't done, but I've got a ball rolling. Documentation and > adapters for existingloggingmechanisms will come next. > > Anyone interested in helping, please contact me! > > On Jul 13, 6:21 pm, "Fred Sauer" <[EMAIL PROTECTED]> wrote: > > > Jarrod, > > > On Sun, Jul 13, 2008 at 3:56 PM, jarrod <[EMAIL PROTECTED]> wrote: > > > > Fred, > > > > I took a look at your library - thanks for the pointer. It looks like > > > we share a number of ideas. > > > > Having seen a fewloggingimplementations now, I've seen some things l > > > like, and some others I don't. > > > > For example, I like the idea of using RPC to send the log back to the > > > server, but that shouldn't be the only option. > > > > Yes, using a common means of accessing log functions from a bean on > > > both client and server is one of my goals, but here are some > > > additional goals: > > > > - Provide support forlogginglevels and categories (at least in my > > > implementation of LogFactory) > > > This is 'planned', as is the ability to configure log format (a la > > LayoutPattern). Not there yet, though. > > > Currently there is one global compile-time log level (determines how much > >loggingcode is stripped out of your application), and a run-time level to > > temporarily control the flow. No categories (yet). > > > - Providelogging"panel" that works in web mode. I've seen adapters > > > > for Firebug and so on, so reusing existing log mechanisms should be a > > > snap > > > - Provide a chainable log wrapper that allows the client to log to > > > multiple places (maybe both a local buffer and back to the server) > > > - Couldloggingbe done in a pop-under window in web mode? > > > - This is HTML, so a style sheet for web mode to color code logs would > > > be nice. > > > gwt-log actually has several destinations, which I think mostly cover your > > additional use cases: > > > *Logger* *Description* ConsoleLogger Utilizes console.log() for supporting > > browsers and installed JavaScript libraries. FirebugLogger Utilizes > > Firebug<http://www.getfirebug.com/>console > > APIlogging:http://www.getfirebug.com/console.html DivLogger Utilizes a > > floating/draggable DIV for log messages. GWTLogger Utilizes GWT.log(), > > which will appear in the development shell in hosted mode. > > SystemLogger Utilizes > > System.err and System.out. RemoteLogger Sends copies of client log messages > > to the server via RPC. WindowLogger (Experimental) Logs messages to a > > separate window. > > Each can be toggled on/off separately via your *.gwt.xml files, so you can > > have as many or few as you want. > > > > Beyond that, it's a matter of getting other log packages to buy into > > > the common framework. :-) > > > > I do have a project page I'm getting up and working for my stuff. I'll > > > post it here when it's ready-ish. > > > Sound good. I'd like to see it. > > > On Jul 13, 5:30 pm, "Fred Sauer" <[EMAIL PROTECTED]> wrote: > > > > > Jarrod, > > > > > I think the general problem is thatloggingtypically allows for quite a > > > bit > > > > of runtime control overlogginglevels and categories, but that GWT > > > really > > > > shines in its ability to optimize via static analysis and monolithic > > > > compilation. Also,loggingon the client (in this case hosted mode or a > > > web > > > > browser) does have some unique constraints associated with it. That is > > > > to > > > > say, there's not too many places you can actually send the log messages > > > from > > > > the browser sandbox. > > > > > As the author of gwt-log (http://code.google.com/p/gwt-log/), I do think > > > I > > > > provide the next best thing, which is to at least allow you to: > > > > > 1. Use the same Javaloggingmethods on the client and on the server > > > > (which means in your POJOs and whatever else goes over the wire) > > > > 2. Have these log messages from server-side code automatically flow > > > into > > > > log4j or java.utillogging(sorry, didn't write it for commons) > > > > 3. Have these log messages from client-side code (even in web mode) > > > > be > > > > sent to the server via RPC (see RemoteLogger) where they too go to > > > log4j or > > > > java.utilloggingdestinations > > > > > I think you're right that the next step is to take all of that and just > > > wrap > > > > it in a compatible (seemless) API that can be GWT compiled so that you > > > can > > > > just use log4j / java.util / commonsloggingcode in your GWT projects > > > like > > > > you do in your normal Java projects, and have it all "just work". To > > > > that > > > > end, I started log4gwt (http://code.google.com/p/log4gwt/) a little > > > while > > > > ago, although I haven't had much time for it recently. The goal of > > > log4gwt > > > > is to provide everything that gwt-log provides today, but wrapped up in > > > an > > > > Apache log4j API. Perhaps commonsloggingmakes more sense, I just happen > > > to > > > > be a log4j fan. > > > > > Fred Sauer > > > > [EMAIL PROTECTED] > > > > > On Sun, Jul 13, 2008 at 2:55 PM, jarrod <[EMAIL PROTECTED]> > > > wrote: > > > > > > I've been working with GWT for over a year now, and I definitely like > > > > > it, but there's something that's bothering me. In the hundreds of > > > > > third-party libraries available, I have seen very few emerge that > > > > > promote reusable utility classes. > > > > > > Case in point:Logging. I've seen at least three different attempts by > > > > > third-party libraries to re-invent theloggingmechanisms provided by > > > > > GWT to extend new functionality in one way or another. And that's > > > > > fine. But I'd like to see third-party libraries adopt a more standard > > > > > approach tologging. CommonsLogging, anyone? > > > > > > A quick Google search turned up the GWT CommonsLogginglibrary > > > > > (http://code.google.com/p/gwt-commons-logging/). It looks like it > > > > > could use some updating to GWT 1.5, and that's something I'm looking > > > > > into. > > > > > > If you're interested in helping, or you know of some other similar > > > > > efforts, please let me know. > > > > > > Also, if you develop a third-party library for GWT and you are > > > > > interested in adopting a standardizedloggingmechanism, please let me > > > > > know that, also. > > > Fred Sauer > > [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
