开发者

DWR enabling logging in grails?

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?


Not an exact answer, but you can get better logging of information on the front-end with this configuration:

<dwr:configuration>
    ...
    <dwr:convert class="java.lang.Exception" type="exception"/>
    <dwr:convert class="java.lang.StackTraceElement" type="bean"/>
</dwr:configuration>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜