logback-spring.xml
<configuration>
<springProperty name="serviceName" source="spring.application.name" />
<springProperty name="logRoot" source="logging.root" />
<appender name="AUSPIX" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logRoot}/${serviceName}-auspix.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${logRoot}/${serviceName}-auspix-%d{yyyy-MM-dd}.log</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%mdc{REQUEST_UUID}] %marker %msg%n</pattern>
</encoder>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="AUSPIX" level="info" additivity="false">
<appender-ref ref="AUSPIX" />
</logger>
<root level="info">
<appender-ref ref="STDOUT" />
<appender-ref ref="AUSPIX" />
</root>
</configuration>