Configure logback using several profiles

Spring boot documentation recommends to use logback-spring.xml rather than logback.xml and in it you can use spring profile tag:

<configuration>
  <springProfile name="workspace">
    ...
  </springProfile>
  <springProfile name="dev,prd">
    ...
  </springProfile>
</configuration>

Leave a Comment