summaryrefslogtreecommitdiffstats
path: root/prh-app-server/src/main/resources/logback-spring.xml
diff options
context:
space:
mode:
authorLusheng Ji <lji@research.att.com>2018-04-20 13:21:58 +0000
committerGerrit Code Review <gerrit@onap.org>2018-04-20 13:21:58 +0000
commit1fb9130cd488228574b49e078148e4bcf1a7a5a8 (patch)
tree13e4e251d068bb274b2cf6ccfe8f573a13084077 /prh-app-server/src/main/resources/logback-spring.xml
parent23f7acc707bf285df2da4a95b146d1a7f5132453 (diff)
parent5fbcb6344672167e7d1dbf28ecbea3b8f55732fb (diff)
Merge "Implementation for HTTP/HTTPS and endpoints"
Diffstat (limited to 'prh-app-server/src/main/resources/logback-spring.xml')
-rw-r--r--prh-app-server/src/main/resources/logback-spring.xml45
1 files changed, 45 insertions, 0 deletions
diff --git a/prh-app-server/src/main/resources/logback-spring.xml b/prh-app-server/src/main/resources/logback-spring.xml
new file mode 100644
index 00000000..af4ab189
--- /dev/null
+++ b/prh-app-server/src/main/resources/logback-spring.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+ <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
+ <property name="LOG_FILE"
+ value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}spring.log}"/>
+
+ <springProfile name="dev">
+ <include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
+ <appender name="ROLLING-FILE"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <encoder>
+ <pattern>${FILE_LOG_PATTERN}</pattern>
+ </encoder>
+ <file>${LOG_FILE}</file>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.log</fileNamePattern>
+ </rollingPolicy>
+ </appender>
+ <root level="ERROR">
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="ROLLING-FILE"/>
+ </root>
+ </springProfile>
+
+ <springProfile name="prod">
+ <appender name="ROLLING-FILE"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <encoder>
+ <pattern>${FILE_LOG_PATTERN}</pattern>
+ </encoder>
+ <file>${LOG_FILE}</file>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz</fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>10MB</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ </rollingPolicy>
+ </appender>
+
+ <root level="ERROR">
+ <appender-ref ref="ROLLING-FILE"/>
+ </root>
+ </springProfile>
+</configuration> \ No newline at end of file