Spring Boot Logging Web

Enables RestTemplate and RestController request logging in Spring Boot applications

License

License

Categories

Categories

Spring Boot Container Microservices Logging Application Layer Libs
GroupId

GroupId

io.github.goetschalckx
ArtifactId

ArtifactId

spring-boot-logging-web
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

Spring Boot Logging Web
Enables RestTemplate and RestController request logging in Spring Boot applications
Project URL

Project URL

https://github.com/goetschalckx/spring-boot-logging-web
Source Code Management

Source Code Management

https://github.com/goetschalckx/spring-boot-logging-web

Download spring-boot-logging-web

Dependencies

runtime (2)

Group / Artifact Type Version
net.logstash.logback : logstash-logback-encoder jar 6.3
org.springframework.boot : spring-boot-starter-web jar 1.4.0.RELEASE

Project Modules

There are no modules declared in this project.

Build Status License

Coverage Codacy Codacy Coverage CodeFactor Vulnerabilities

Release Snapshot

spring-boot-logging-web

by Eric Goetschalckx

Provides automated web request and response logging for Spring (including advanced logback functionality)

Minimum Requirements

Requires spring-boot-starter-web 2.0.0.RELEASE or higher.

Spring Configuration

spring-boot-logging-web includes request & response logging mechanisms for Spring RestTemplate and RestController.

These capabilities will have negative performance impact, so they are disabled by default. Including the body of the requests and responses in the log statements will further degrade performance.

The following configuration properties are available for managing logging settings:

# Logging settings 
logging:
  
  # Spring Web request response logging settings
  web:
      
      # Spring RestTemplate response logging settings
      client:

        # RestTemplate request response bo logging enabled
        # Optional (default is false)
        enabled: true
     
        # Include web request response body in logs
        # Has performance impact due to byte stream copying
        # Optional (default is false)
        include-body: true

      # Spring RestTemplate response logging settings
      server:

        # RestTemplate request response bo logging enabled
        # Optional (default is false)
        enabled: true
     
        # Include web request response body in logs
        # Has performance impact due to byte stream copying
        # Optional (default is false)
        include-body: true

Notes

Works well with spring-boot-logging-json.

io.github.goetschalckx

Goetschalckx

Versions

Version
0.1.0