miwoe / spring-boot-logging

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Practical logging in Spring Boot

This setup shows how to configure logging for use in a production ready environment.

Making some assumptions:

  • You want a common logging configuration for ALL environments:

    • Same appenders
    • Different logging levels
    • Same patterns

Externalizing configuration via Springs default configuration framework (or maybe advanced cloud concepts...)

This means:

  • Basic setup in code
  • Environment specific setup in application.properties (or other possible config file)

Basic setup:

Can be made in logback-spring.xml. Configure whatever you want.

Environment specific setup:

Put logging levels, paths in environment specific properties or other Spring configuration locations.

About


Languages

Language:Shell 52.2%Language:Batchfile 37.0%Language:Java 10.7%