Spring MVC logger

A small Java library to log http requests/responses when using Spring MVC

License

License

Categories

Categories

Spring MVC User Interface Web Frameworks
GroupId

GroupId

com.github.isrsal
ArtifactId

ArtifactId

spring-mvc-logger
Last Version

Last Version

0.2
Release Date

Release Date

Type

Type

jar
Description

Description

Spring MVC logger
A small Java library to log http requests/responses when using Spring MVC
Project URL

Project URL

https://github.com/isrsal/spring-mvc-logger
Source Code Management

Source Code Management

http://github.com/isrsal/spring-mvc-logger

Download spring-mvc-logger

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.isrsal/spring-mvc-logger/ -->
<dependency>
    <groupId>com.github.isrsal</groupId>
    <artifactId>spring-mvc-logger</artifactId>
    <version>0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.isrsal/spring-mvc-logger/
implementation 'com.github.isrsal:spring-mvc-logger:0.2'
// https://jarcasting.com/artifacts/com.github.isrsal/spring-mvc-logger/
implementation ("com.github.isrsal:spring-mvc-logger:0.2")
'com.github.isrsal:spring-mvc-logger:jar:0.2'
<dependency org="com.github.isrsal" name="spring-mvc-logger" rev="0.2">
  <artifact name="spring-mvc-logger" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.isrsal', module='spring-mvc-logger', version='0.2')
)
libraryDependencies += "com.github.isrsal" % "spring-mvc-logger" % "0.2"
[com.github.isrsal/spring-mvc-logger "0.2"]

Dependencies

compile (5)

Group / Artifact Type Version
javax.servlet : servlet-api jar 2.5
org.slf4j : slf4j-log4j12 jar 1.7.2
log4j : log4j jar 1.2.17
commons-io : commons-io jar 2.3
org.springframework : spring-webmvc jar 3.0.6.RELEASE

Project Modules

There are no modules declared in this project.

spring-mvc-logger

  1. Add to pom.xml
   <dependency>
        <groupId>com.github.isrsal</groupId>
        <artifactId>spring-mvc-logger</artifactId>
        <version>0.2</version>
    </dependency>
  1. 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>
  1. Add to log4j.xml
   <logger name="com.github.isrsal.logging.LoggingFilter">
      <level value="DEBUG"/>
   </logger>

Versions

Version
0.2
0.1