<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <include resource="org/springframework/boot/logging/logback/base.xml"/>
    <jmxConfigurator/>
    <property name="LOG_PATH" value="logs"/>
    <property name="APPLICATION" value="elab-marketing-user" />

    <appender name="elab-marketing-info" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <File>${LOG_PATH}/${APPLICATION}.log</File>
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <fileNamePattern>${LOG_PATH}/%d{yyyyMMdd}/${APPLICATION}-%d{yyyyMMdd}-%i.log</fileNamePattern>
            <maxHistory>30</maxHistory>
            <totalSizeCap>30GB</totalSizeCap>
            <maxFileSize>100MB</maxFileSize>
        </rollingPolicy>
        <encoder>
            <pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - [%file:%line] - %msg%n</pattern>
        </encoder>
    </appender>

    <root level="INFO">
        <appender-ref ref="elab-marketing-info"/>
    </root>
    <logger name="com.elab" level="DEBUG"/>
</configuration>