<?xml version="1.0" encoding="UTF-8"?>
<configuration>

    <property name="LOG_DIR" value="/logs/was/aicb/cinnamon_ui" />
    <property name="LOG_PATH_NAME" value="${LOG_DIR}/cinnamon_ui" />
    <property name="ROLLING_PATH_NAME" value="${LOG_DIR}/logs/cinnamon_ui" />

    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %highlight(%-5level) %magenta(%-4relative) - [%thread{10}, %X{traceId:-}, %X{spanId:-}] %cyan(%logger{20}): %msg%n</pattern>
        </encoder>
    </appender>

    <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${LOG_PATH_NAME}.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${ROLLING_PATH_NAME}.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>90</maxHistory>
<!--            <totalSizeCap>1GB</totalSizeCap>-->
        </rollingPolicy>
<!--        파일은 기본적으로 파일네임으로 생성되고, 롤링시 패턴적용됨 jangwonseok-->
        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
            <pattern>%d{yyyy-MM-dd HH:mm:ss} [%-5p] [%F]%M\(%L\) : %m%n</pattern>
        </encoder>


    </appender>
    <!-- 로칼테스트 일때.. -->
    <logger name="jdbc" level="OFF"/>
    <logger name="jdbc.sqlonly" level="OFF"/>
    <logger name="jdbc.sqltiming" level="DEBUG"/>
    <logger name="jdbc.audit" level="OFF"/>
    <logger name="jdbc.resultset" level="OFF"/>
    <logger name="jdbc.resultsettable" level="DEBUG"/>
    <logger name="jdbc.connection" level="OFF"/>

    <root level="INFO">
        <appender-ref ref="STDOUT"/>
        <appender-ref ref="FILE"/>
    </root>

</configuration>