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