amatthews | 736bf37 | 2021-12-14 16:04:15 +0000 | [diff] [blame] | 1 | <!-- |
| 2 | ============LICENSE_START======================================================= |
| 3 | policy-gui |
| 4 | ================================================================================ |
| 5 | Copyright (C) 2021-2022 Nordix Foundation. |
| 6 | ================================================================================ |
| 7 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | you may not use this file except in compliance with the License. |
| 9 | You may obtain a copy of the License at |
| 10 | |
| 11 | http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | |
| 13 | Unless required by applicable law or agreed to in writing, software |
| 14 | distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | See the License for the specific language governing permissions and |
| 17 | limitations under the License. |
| 18 | ============LICENSE_END========================================================= |
| 19 | --> |
| 20 | |
| 21 | <configuration scan="true" scanPeriod="30 seconds" debug="false"> |
| 22 | <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
| 23 | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| 24 | <level>TRACE</level> |
| 25 | </filter> |
| 26 | <encoder> |
| 27 | <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n |
| 28 | </pattern> |
| 29 | </encoder> |
| 30 | </appender> |
| 31 | |
| 32 | <appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 33 | <file>${POLICY_LOGS}/error.log</file> |
| 34 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| 35 | <fileNamePattern>${POLICY_LOGS}/error.%d{yyyy-MM-dd}.%i.log.zip |
| 36 | </fileNamePattern> |
| 37 | <maxFileSize>50MB</maxFileSize> |
| 38 | <maxHistory>30</maxHistory> |
| 39 | <totalSizeCap>10GB</totalSizeCap> |
| 40 | </rollingPolicy> |
| 41 | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| 42 | <level>TRACE</level> |
| 43 | </filter> |
| 44 | <encoder> |
| 45 | <pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</pattern> |
| 46 | </encoder> |
| 47 | </appender> |
| 48 | |
| 49 | <appender name="asyncError" class="ch.qos.logback.classic.AsyncAppender"> |
| 50 | <appender-ref ref="ERROR" /> |
| 51 | </appender> |
| 52 | |
| 53 | <appender name="DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 54 | <file>${POLICY_LOGS}/debug.log</file> |
| 55 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| 56 | <fileNamePattern>${POLICY_LOGS}/debug.%d{yyyy-MM-dd}.%i.log.zip |
| 57 | </fileNamePattern> |
| 58 | <maxFileSize>50MB</maxFileSize> |
| 59 | <maxHistory>30</maxHistory> |
| 60 | <totalSizeCap>10GB</totalSizeCap> |
| 61 | </rollingPolicy> |
| 62 | <encoder> |
| 63 | <pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</pattern> |
| 64 | </encoder> |
| 65 | </appender> |
| 66 | |
| 67 | <appender name="asyncDebug" class="ch.qos.logback.classic.AsyncAppender"> |
| 68 | <appender-ref ref="DEBUG" /> |
| 69 | </appender> |
| 70 | |
| 71 | <appender name="NETWORK" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 72 | <file>${POLICY_LOGS}/network.log</file> |
| 73 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| 74 | <fileNamePattern>${POLICY_LOGS}/network.%d{yyyy-MM-dd}.%i.log.zip |
| 75 | </fileNamePattern> |
| 76 | <maxFileSize>50MB</maxFileSize> |
| 77 | <maxHistory>30</maxHistory> |
| 78 | <totalSizeCap>10GB</totalSizeCap> |
| 79 | </rollingPolicy> |
| 80 | <encoder> |
| 81 | <pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n</pattern> |
| 82 | </encoder> |
| 83 | </appender> |
| 84 | |
| 85 | <appender name="asyncNetwork" class="ch.qos.logback.classic.AsyncAppender"> |
| 86 | <appender-ref ref="NETWORK" /> |
| 87 | </appender> |
| 88 | |
| 89 | <logger name="network" level="TRACE" additivity="false"> |
| 90 | <appender-ref ref="asyncNetwork" /> |
| 91 | </logger> |
| 92 | |
| 93 | <logger name="org.apache" level="TRACE" additivity="false"> |
| 94 | <appender-ref ref="DEBUG" /> |
| 95 | </logger> |
| 96 | |
| 97 | <!-- Spring related loggers --> |
| 98 | <logger name="org.springframework" level="TRACE" additivity="false"> |
| 99 | <appender-ref ref="DEBUG" /> |
| 100 | </logger> |
| 101 | |
| 102 | <!-- GUI related loggers --> |
| 103 | <logger name="org.onap.policy.gui" level="TRACE" additivity="false"> |
| 104 | <appender-ref ref="ERROR" /> |
| 105 | <appender-ref ref="DEBUG" /> |
| 106 | </logger> |
| 107 | |
| 108 | <!-- logback internals logging --> |
| 109 | <logger name="ch.qos.logback.classic" level="INFO" /> |
| 110 | <logger name="ch.qos.logback.core" level="INFO" /> |
| 111 | |
| 112 | <root level="TRACE"> |
| 113 | <appender-ref ref="asyncDebug" /> |
| 114 | <appender-ref ref="asyncError" /> |
| 115 | <appender-ref ref="asyncNetwork" /> |
| 116 | <appender-ref ref="STDOUT" /> |
| 117 | </root> |
| 118 | </configuration> |