Hi All, I have sucessfully ported apache commons logging so that it can be used from GWT as well as J2ME (I did this for a cell phone vid).
The code is at: http://cvs.adligo.org/viewvc/ A demo is here; http://www.adligo.com/products.html (Server and log console popup are whats for sale, but you could probally write your own in a person day or so) However I ran into a snage with initalization that I believe can be fixed by a edit to the GWT compiler. The problem is that the only way to get the code to initalize so that the LogFactory works correctly is to put some initalization code in the onModuleLoad(), and even after thats done logs are only available by putting code to fetch the Log implementaions in object methods (ie); public void foo() { Log log = LogFactory.getLog(String.class); } In other java environments log initaliztion is usually done with a static intalizer (ie); public class MyEntryPoint extends EntryPoint { static { //log init code goes here } //other entry point code } So that Logs can be obtained in a static way; public class Foo { public static final Log log = LogFactory.getLog(Foo.class); } I would like to see the GWT compiler support the static initalizer and call it before constructing the Entry Point class. This would enable java that is compiled for java script as well as servlet code to be constructed with the best logging practices. Cheers, Scott --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
