Permana
2018-10-02 2429c55948869951cf10ffea42e8b79054e93068
commit | author | age
9f0281 1 <?xml version="1.0" encoding="UTF-8"?>
P 2 <configuration>
3
4     <property name="LOG_PATTERN"
5               value='{"level":"%level","time":"%date","location":"%logger","method":"%M","message":%msg},%n'/>
6     <springProfile name="dev">
7         <property name="LOG_PATH" value="~/drive/amcloud/Project/ECOMMERS/payment_gateway/log/"/>
8     </springProfile>
9     <springProfile name="prod">
10         <property name="LOG_PATH" value="/app1/am/app/unipin/log"/>
11     </springProfile>
12     <!-- Send debug messages to System.out -->
13     <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
14         <!-- By default, encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
15         <encoder>
16             <pattern>${LOG_PATTERN}</pattern>
17         </encoder>
18     </appender>
19
20     <!-- Send debug message to file -->
21     <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
2429c5 22         <file>${LOG_PATH}/unipin-cms-service-unipin.log</file>
9f0281 23
P 24         <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
25             <pattern>${LOG_PATTERN}</pattern>
26         </encoder>
27
28         <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
2429c5 29             <fileNamePattern>${LOG_PATH}/cms/unipin-cms-service-unipin-%i-%d{yyyyMMdd}.log</fileNamePattern>
9f0281 30
P 31             <!-- each file should be at most 10MB, keep 90 days worth of history -->
32             <maxHistory>90</maxHistory>
33             <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
34                 <maxFileSize>10MB</maxFileSize>
35             </timeBasedFileNamingAndTriggeringPolicy>
36         </rollingPolicy>
37     </appender>
38
39     <root level="INFO">
40         <springProfile name="dev">
41             <appender-ref ref="STDOUT"/>
42         </springProfile>
43         <springProfile name="prod">
44             <appender-ref ref="FILE"/>
45             <appender-ref ref="DB"/>
46         </springProfile>
47     </root>
48 </configuration>