JavaScud | Forum | JIRA | Blog |
  Dashboard > DWR中文文档 > ... > WEB-INF Configuration > Logging
  DWR中文文档 Log In View a printable version of the current page.  
  Logging
Added by 黑灵, last edited by 黑灵 on Oct 20, 2006
Labels: 
(None)

Logging

DWR可以工作在JDK1.3上,而JDK1.3不支持java.util.logging,但是我们想强迫任何人使用commons-logging或者log4j,所以当没有logging类的时候DWR就使用HttpServlet.log()方法。尽管如此,如果DWR发现了commons-logging,就是使用它。

Commons-Logging

几乎每一个人都在使用commons-logging,因为大多数的servlet容器在使用它。所以如果你的web应用中没有明显的加入commons-logging包,它也会默认的配置好。

在这种情况下,logging是由java.util.logging或者log4j配置文件控制的。详细配置查看文档。

HttpServlet.log()

如果你用HttpServlet.log(), 下面的配置控制logging:

<init-param> 
<param-name>logLevel</param-name> 
<param-value>DEBUG</param-value> 
</init-param>

可用的值有:FATAL, ERROR, WARN (默认), INFO 和 DEBUG。

Site running on a free Atlassian Confluence Open Source Project License granted to WebWork China. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.3 Build:#808 May 29, 2007) - Bug/feature request - Contact Administrators