Skip to content

tufangorel/spring-boot-logback-profile-based-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-boot-logback-profile-based-config

Execute test class in dev or prod profile to get different detail levels of log information for a spring boot application using logback.

Tech Stack

Java 11
H2 Database Engine
spring boot
spring data jpa
hibernate
logback
maven
junit

1-) Package spring boot application with dev profile to get detailed log during packaging

D:\DEV\spring-boot-logback-profile-based-config> mvnw.cmd clean package -Dspring.profiles.active=dev

DEBUG [main] org.springframework.boot.StartupInfoLogger: Running with Spring Boot v2.4.4, Spring v5.3.5
INFO [main] org.springframework.boot.SpringApplication: The following profiles are active: dev
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------


2-) Package spring boot application with prod profile to get info level, limited log during packaging

D:\DEV\spring-boot-logback-profile-based-config> mvnw.cmd clean package -Dspring.profiles.active=prod

INFO [main] org.springframework.boot.SpringApplication: The following profiles are active: prod
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

About

spring-boot-logback-profile-based-config

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages