Sylvain Desbureaux | a41dfc0 | 2021-02-15 10:14:22 +0100 | [diff] [blame] | 1 | {{/*<!--
|
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 2 | ============LICENSE_START=======================================================
|
| 3 | org.onap.aai
|
| 4 | ================================================================================
|
| 5 | Copyright © 2017 AT&T Intellectual Property. All rights reserved.
|
| 6 | Modifications Copyright © 2018 Amdocs, Bell Canada
|
Sylvain Desbureaux | a41dfc0 | 2021-02-15 10:14:22 +0100 | [diff] [blame] | 7 | Modifications Copyright © 2020 Orange
|
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 8 | ================================================================================
|
| 9 | Licensed under the Apache License, Version 2.0 (the "License");
|
| 10 | you may not use this file except in compliance with the License.
|
| 11 | You may obtain a copy of the License at
|
| 12 |
|
Sylvain Desbureaux | a41dfc0 | 2021-02-15 10:14:22 +0100 | [diff] [blame] | 13 | http://www.apache.org/licenses/LICENSE-2.0
|
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 14 |
|
| 15 | Unless required by applicable law or agreed to in writing, software
|
| 16 | distributed under the License is distributed on an "AS IS" BASIS,
|
| 17 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 18 | See the License for the specific language governing permissions and
|
| 19 | limitations under the License.
|
| 20 | ============LICENSE_END=========================================================
|
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 21 | -->
|
leila | b3bfd4d | 2022-11-10 14:27:16 -0500 | [diff] [blame] | 22 | */}}
|
| 23 | <configuration scan="true" scanPeriod="60 seconds" debug="false">
|
Fiete Ostkamp | 42de546 | 2024-01-04 13:56:15 +0100 | [diff] [blame] | 24 | <property name="AJSC_HOME" value="${AJSC_HOME:-.}" />
|
| 25 | <property name="maxHistory" value='{{.Values.accessLogback.maxHistory}}' />
|
| 26 | <property name="totalSizeCap" value='{{.Values.accessLogback.totalSizeCap}}' />
|
| 27 | <property name="logToFileEnabled" value='{{.Values.accessLogback.logToFileEnabled}}' />
|
| 28 | <property name="livenessAccessLogEnabled"
|
| 29 | value='{{.Values.accessLogback.livenessAccessLogEnabled}}' />
|
leila | b3bfd4d | 2022-11-10 14:27:16 -0500 | [diff] [blame] | 30 |
|
Fiete Ostkamp | 42de546 | 2024-01-04 13:56:15 +0100 | [diff] [blame] | 31 | <if condition='property("logToFileEnabled").contains("true")'>
|
| 32 | <then>
|
| 33 | <appender name="ACCESS" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
| 34 | <file>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log</file>
|
| 35 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
| 36 | <fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd}
|
| 37 | </fileNamePattern>
|
| 38 | <maxHistory>${maxHistory}</maxHistory>
|
| 39 | <totalSizeCap>${totalSizeCap}</totalSizeCap>
|
| 40 | </rollingPolicy>
|
Sylvain Desbureaux | a41dfc0 | 2021-02-15 10:14:22 +0100 | [diff] [blame] | 41 | <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder">
|
Fiete Ostkamp | 42de546 | 2024-01-04 13:56:15 +0100 | [diff] [blame] | 42 | <Pattern>%a %u %z [%t] "%m %U%q" %s %b %y %i{X-TransactionId} %i{X-FromAppId}
|
| 43 | %i{X-Forwarded-For} %i{X-AAI-SSL-Client-CN} %i{X-AAI-SSL-Client-OU}
|
| 44 | %i{X-AAI-SSL-Client-O} %i{X-AAI-SSL-Client-L} %i{X-AAI-SSL-Client-ST}
|
| 45 | %i{X-AAI-SSL-Client-C} %i{X-AAI-SSL-Client-NotBefore} %i{X-AAI-SSL-Client-NotAfter}
|
| 46 | %i{X-AAI-SSL-Client-DN} %D</Pattern>
|
Sylvain Desbureaux | a41dfc0 | 2021-02-15 10:14:22 +0100 | [diff] [blame] | 47 | </encoder>
|
Fiete Ostkamp | 42de546 | 2024-01-04 13:56:15 +0100 | [diff] [blame] | 48 | </appender>
|
| 49 | <appender-ref ref="ACCESS" />
|
| 50 | </then>
|
| 51 | </if>
|
| 52 |
|
| 53 | <appender name="STDOUTACCESS" class="ch.qos.logback.core.ConsoleAppender">
|
| 54 | <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder">
|
| 55 | <Pattern>%a %u %z [%t] "%m %U%q" %s %b %y %i{X-TransactionId} %i{X-FromAppId}
|
| 56 | %i{X-Forwarded-For} %i{X-AAI-SSL-Client-CN} %i{X-AAI-SSL-Client-OU} %i{X-AAI-SSL-Client-O}
|
| 57 | %i{X-AAI-SSL-Client-L} %i{X-AAI-SSL-Client-ST} %i{X-AAI-SSL-Client-C}
|
| 58 | %i{X-AAI-SSL-Client-NotBefore} %i{X-AAI-SSL-Client-NotAfter} %i{X-AAI-SSL-Client-DN} %D -
|
| 59 | "logType": "access"</Pattern>
|
| 60 | </encoder>
|
| 61 | <if condition='property("livenessAccessLogEnabled").contains("false")'>
|
| 62 | <then>
|
| 63 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
|
| 64 | <evaluator class="ch.qos.logback.access.net.URLEvaluator">
|
| 65 | <URL>/aai/util/echo</URL>
|
| 66 | </evaluator>
|
| 67 | <OnMismatch>NEUTRAL</OnMismatch>
|
| 68 | <OnMatch>DENY</OnMatch>
|
| 69 | </filter>
|
| 70 | </then>
|
| 71 | </if>
|
| 72 | </appender>
|
| 73 | <appender-ref ref="STDOUTACCESS" />
|
leila | b3bfd4d | 2022-11-10 14:27:16 -0500 | [diff] [blame] | 74 | </configuration>
|
| 75 | {{/*<!--
|
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 76 | %a - Remote IP address
|
| 77 | %A - Local IP address
|
| 78 | %b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent
|
| 79 | %B - Bytes sent, excluding HTTP headers
|
| 80 | %h - Remote host name
|
| 81 | %H - Request protocol
|
| 82 | %l - Remote logical username from identd (always returns '-')
|
| 83 | %m - Request method
|
| 84 | %p - Local port
|
| 85 | %q - Query string (prepended with a '?' if it exists, otherwise an empty string
|
| 86 | %r - First line of the request
|
| 87 | %s - HTTP status code of the response
|
| 88 | %S - User session ID
|
| 89 | %t - Date and time, in Common Log Format format
|
| 90 | %u - Remote user that was authenticated
|
| 91 | %U - Requested URL path
|
| 92 | %v - Local server name
|
| 93 | %I - current request thread name (can compare later with stacktraces)
|
| 94 |
|
| 95 | %z - Custom pattern that parses the cert for the subject
|
| 96 | %y - Custom pattern determines rest or dme2
|
Sylvain Desbureaux | a41dfc0 | 2021-02-15 10:14:22 +0100 | [diff] [blame] | 97 | -->*/}} |