1

How do I configure grails 3 which uses logback as the default logging framework to log HTTPrequests of the embedded tomcat just like the tomcat application server does in creating a log-access log file?

I know I have to use the logback access module, but it is stated that it works with deployment containers such as tomcat and jetty

JohnTheBeloved
  • 2,323
  • 3
  • 19
  • 24

1 Answers1

1

My Grails 3 app was using the following dependency:

org.springframework.boot:spring-boot-starter-tomcat

A quick search led me to: http://docs.spring.io/spring-boot/docs/current/reference/html/howto-embedded-servlet-containers.html

So my application.yml file now contains a block like below:

server:
    tomcat:
        basedir: '.'
        accesslog:
            enabled: true
            pattern: '%t %a %u "%r" %s (%D ms)'
ls91
  • 11
  • 2