<?xml version="1.0" encoding="UTF8"?>
<configuration>
    <jmxConfigurator />
    <property name="LOG_HOME" value="/tmp/log/sv/oms"/>
    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
            </pattern>
        </encoder>
    </appender>

    <appender name="webLogFile"
              class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${LOG_HOME}/oms.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOG_HOME}/oms-sys.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>30</maxHistory>
        </rollingPolicy>

        <encoder>
            <pattern>%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
            </pattern>
        </encoder>
    </appender>


    <appender name="springLogFile"
              class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${LOG_HOME}/oms-spring.log</file>

        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${LOG_HOME}/oms-spring-%d{yyyy-MM-dd_HH}.%i.log
            </fileNamePattern>
            <timeBasedFileNamingAndTriggeringPolicy
                    class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
                <maxFileSize>10MB</maxFileSize>
            </timeBasedFileNamingAndTriggeringPolicy>
        </rollingPolicy>

        <encoder>
            <pattern>%d{HH:mm:ss.SSS},%msg%n</pattern>
        </encoder>
    </appender>


    <!-- root -->
    <root level="info">
        <appender-ref ref="console" />
        <appender-ref ref="webLogFile" />
    </root>
</configuration>