Show Navigation

request-tracelog

Grails request-tracelog plugin

Owner: nobeans | 1.3.0 | Jun 14, 2017 | Package | Issues | Source | License: Apache-2.0


dependencies {
    compile 'org.grails.plugins:request-tracelog:1.3.0'
}

            

Request Tracelog Plugin for Grails 3

This is a Grails 3 plugin to get info logs of request.

Installation

In build.gradle:

dependencies {
    compile "org.grails.plugins:request-tracelog:1.2.0"
}

Usage

All you have to do is to install the plugin. Only in the development environment, three request logs emit as follows:

Before Action
    Request ID: ServletWebRequest: uri=/myapp/sample/index;client=0:0:0:0:0:0:0:1;session=FBDC27659D49A5EB8C257F25922DA45B
    Request attributes:
        applicationContextIdFilter.FILTERED: true
        characterEncodingFilter.FILTERED: true
        grailsWebRequestFilter.FILTERED: true
        hiddenHttpMethodFilter.FILTERED: true
        metricFilter.FILTERED: true
        org.grails.ACTION_NAME_ATTRIBUTE: index
        org.grails.CONTROLLER_NAME_ATTRIBUTE: sample
        org.grails.RESPONSE_FORMATS: [MimeType { name=*/*,extension=all,parameters=[q:1.0] }]
        org.grails.WEB_REQUEST: ServletWebRequest: uri=/myapp/sample/index;client=0:0:0:0:0:0:0:1;session=FBDC27659D49A5EB8C257F25922DA45B
        org.grails.url.match.info: [email protected]9a
        org.springframework.web.context.request.async.WebAsyncManager.WEB_ASYNC_MANAGER: [email protected]ecd5c7
        org.springframework.web.servlet.DispatcherServlet.CONTEXT: org.springframework.boot[email protected]9cd25ff: startup date [Fri Apr 17 17:12:42 JST 2015]; root of context hierarchy
        org.springframework.web.servlet.DispatcherServlet.FLASH_MAP_MANAGER: [email protected]7be88bf
        org.springframework.web.servlet.DispatcherServlet.LOCALE_RESOLVER: [email protected]99f
        org.springframework.web.servlet.DispatcherServlet.OUTPUT_FLASH_MAP: [:]
        org.springframework.web.servlet.DispatcherServlet.THEME_RESOLVER: [email protected]e
        org.springframework.web.servlet.DispatcherServlet.THEME_SOURCE: org.springframework.boot[email protected]9cd25ff: startup date [Fri Apr 17 17:12:42 JST 2015]; root of context hierarchy
        webRequestLoggingFilter.FILTERED: true
    Request parameters:
        action: index
        controller: sample
    Session attributes:
        org.grails.FLASH_SCOPE: [:]
    Cookies:
        JSESSIONID: FBDC27659D49A5EB8C257F25922DA45B (domain=null, path=null, maxAge=-1, secure=false, comment=null)

After Action (time: 0.009[sec])
    Request ID: ServletWebRequest: uri=/myapp/sample/index;client=0:0:0:0:0:0:0:1;session=FBDC27659D49A5EB8C257F25922DA45B
    Request parameters:
        action: index
        controller: sample
    Session attributes:
        org.grails.FLASH_SCOPE: [:]
    Cookies:
        JSESSIONID: FBDC27659D49A5EB8C257F25922DA45B (domain=null, path=null, maxAge=-1, secure=false, comment=null)

After View (time: 0.011[sec])
    Request ID: ServletWebRequest: uri=/myapp/sample/index;client=0:0:0:0:0:0:0:1;session=FBDC27659D49A5EB8C257F25922DA45B
    Request parameters:
        action: index
        controller: sample
    Session attributes:
        org.grails.FLASH_SCOPE: [:]
    Cookies:
        JSESSIONID: FBDC27659D49A5EB8C257F25922DA45B (domain=null, path=null, maxAge=-1, secure=false, comment=null)

Configuration

Logging

You can configure log settings (e.g. log level) by using the following FQCN of the interceptor.

grails.app.controllers.request.tracelog.RequestTracelogInterceptor

Code Status

Build Status

License

This is released under the Apache 2.0 License