Permana
2018-10-02 2429c55948869951cf10ffea42e8b79054e93068
unipin_notification_service/src/main/resources/logback.xml
....@@ -1,22 +1,32 @@
11 <?xml version="1.0" encoding="UTF-8"?>
22 <configuration>
33
4
- <property name="LOG_PATTERN" value="%d %-5level [%logger{20}] %msg%n" />
4
+ <property name="LOG_PATTERN" value="%d %-5level [%logger{20}] %msg%n"/>
55
66 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
7
- <encoder>
7
+ <encoder>
88 <pattern>${LOG_PATTERN}</pattern>
99 </encoder>
1010 </appender>
1111
1212 <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
13
- <file>/app1/am/app/unipin/log/unipin-notification-service.log</file>
13
+ <springProfile name="dev">
14
+ <file>~/drive/amcloud/Project/ECOMMERS/payment_gateway/log/unipin-notification-service.log</file>
15
+ </springProfile>
16
+ <springProfile name="prod">
17
+ <file>/app1/am/app/unipin/log/unipin-notification-service.log</file>
18
+ </springProfile>
1419 <encoder>
1520 <pattern>${LOG_PATTERN}</pattern>
1621 </encoder>
1722
1823 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
19
- <fileNamePattern>/app1/am/app/unipin/log/notification/log.log.%d{yyyyMMdd}</fileNamePattern>
24
+ <springProfile name="dev">
25
+ <fileNamePattern>/~/drive/amcloud/Project/ECOMMERS/payment_gateway/log/notification/log.log.%d{yyyyMMdd}</fileNamePattern>
26
+ </springProfile>
27
+ <springProfile name="prod">
28
+ <fileNamePattern>/app1/am/app/unipin/log/notification/log.log.%d{yyyyMMdd}</fileNamePattern>
29
+ </springProfile>
2030 <maxHistory>180</maxHistory>
2131 </rollingPolicy>
2232
....@@ -25,6 +35,12 @@
2535
2636 <root level="info">
2737 <!--<appender-ref ref="STDOUT" />-->
28
- <appender-ref ref="FILE" />
38
+ <springProfile name="dev">
39
+ <appender-ref ref="STDOUT"/>
40
+ </springProfile>
41
+
42
+ <springProfile name="prod">
43
+ <appender-ref ref="FILE"/>
44
+ </springProfile>
2945 </root>
3046 </configuration>