DWR 在 grails 中启用日志记录吗?
我正在使用 DWR3,但我不知道如何让日志记录工作。无论我做什么,当我尝试调试编组问题时,我似乎都看不到任何 DWR3 输出。如何启用日志记录?
web.xml
<servlet>
<servlet-name>dwr</servlet-name>
<servlet-class>org.directwebremoting.spring.DwrSpringServlet</servlet-class>
<init-param>
<param-name>jsonpEnabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>accessLogLevel</param-name>
<param-value>CALL</param-value>
</init-param>
</servlet>
Config.groovy
debug 'org.directwebremoting.log.*'
info 'com.example.b'
debug 'com.example.a'
// Example of changing the log pattern for the default console
// appender:
//
appenders {
console name: 'stdout', layout: pattern(conversionPattern: '%-5p: %c - %m%n')
}
这里发生了什么?
I'm using DWR3, but I have no idea how to get logging working. No matter what I do, I can't seem to see any DWR3 output as I attempt to debug a marshalling issue. How do I enable logging?
web.xml
<servlet>
<servlet-name>dwr</servlet-name>
<servlet-class>org.directwebremoting.spring.DwrSpringServlet</servlet-class>
<init-param>
<param-name>jsonpEnabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>accessLogLevel</param-name>
<param-value>CALL</param-value>
</init-param>
</servlet>
Config.groovy
debug 'org.directwebremoting.log.*'
info 'com.example.b'
debug 'com.example.a'
// Example of changing the log pattern for the default console
// appender:
//
appenders {
console name: 'stdout', layout: pattern(conversionPattern: '%-5p: %c - %m%n')
}
What's going on here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不是确切的答案,但您可以使用此配置在前端获得更好的信息记录:
Not an exact answer, but you can get better logging of information on the front-end with this configuration: