9

Just think it will be a useful feature for dev stage. Is it something I can configure or requires a bit coding? Thank you stackers!

2 Answers 2

5

Use: spring-mvc-logger

Add to pom.xml:

<dependency>
    <groupId>com.github.isrsal</groupId>
    <artifactId>spring-mvc-logger</artifactId>
    <version>0.2</version>
</dependency>

Add to web.xml:

<filter>
    <filter-name>loggingFilter</filter-name>
    <filter-class>com.github.isrsal.logging.LoggingFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>loggingFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

Add to log4j.xml:

<logger name="com.github.isrsal.logging.LoggingFilter">
    <level value="DEBUG"/>
</logger>
Sign up to request clarification or add additional context in comments.

Comments

3

Take a look at the AbstractRequestLoggingFilter family of filters.

Aslo it may be convenient to use client-side tools for debugging, such as Firebug or Fiddler.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.