Logging
For DWR 3.x
DWR depends on commons-logging and does all it's logging through that. For details on how to configure DWR logging, see the configuration information for the logging library that commons-logging is outputting to.
Out of the box, DWR 3 and up are silent about method invocations and exceptions. If you turn debug logging on you will get some output, but the best way to see what is going on is to use a LogAjaxFilter. The simplest way to configure this is to use the following line in dwr.xml:
<dwr>
<allow>
<filter class="org.directwebremoting.filter.AuditLogAjaxFilter"/>
...
This functionality is available from milestone 2.
For DWR 1.x and 2.0
DWR works in JDK 1.3 which does not support java.util.logging, but we don't want to force anyone to use commons-logging or log4j, so DWR will work if no logging classes are present by using the HttpServlet.log() methods. However if DWR discovers commons-logging then it will use that in place of servlet logging.
In practice, almost everyone will be using commons-logging because many servlet containers use it. So even if your webapp isn't explicitly using commons-logging it is probably available by default.
Configuring Log4J for DWR
Debug logging can be enabled in DWR with the following:
log4j.logger.org.directwebremoting=DEBUG
See the log4j documentation for more details.
Configuring java.util.logging for DWR
See the java.util.logging documentation for more details.
HttpServlet.log()
If you are using HttpServlet.log() (DWR 1.x and 2.0 only), the following stanza controls DWR logging:
<init-param> <param-name>logLevel</param-name> <param-value>DEBUG</param-value> </init-param>
The valid values are: FATAL, ERROR, WARN (the default), INFO and DEBUG.