Out there is lib which supports this named log4j-gwt.
In order to use log4j on the client side of a GWT application, you need to:
- add log4j-gwt.jar to the classpath right next to log4j.jar. Usually this is done by copying it to war/WEB-INF/lib
- add the following line to your module.gwt.xml file:
Just use it in your client site code like normal log4j.
private static Logger logger = Logger.getLogger(MyClass.class);
This comment has been removed by the author.
ReplyDeleteadd the following line to your module.gwt.xml file:
ReplyDelete"<" inherits name="org.apache.log4j.Log4j" "/" ">"
with the appropriate paranthesis