blob: 5e3a15c66a33fe35b2c2c9b8b2f84b5ad94cbc44 [file] [log] [blame]
Sylvain Desbureauxa41dfc02021-02-15 10:14:22 +01001{{/*<!--
Sylvain Desbureaux70070412020-11-09 21:58:48 +01002 ============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 Desbureauxa41dfc02021-02-15 10:14:22 +01007 Modifications Copyright © 2020 Orange
Sylvain Desbureaux70070412020-11-09 21:58:48 +01008 ================================================================================
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 Desbureauxa41dfc02021-02-15 10:14:22 +010013 http://www.apache.org/licenses/LICENSE-2.0
Sylvain Desbureaux70070412020-11-09 21:58:48 +010014
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 Desbureaux70070412020-11-09 21:58:48 +010021-->
leilab3bfd4d2022-11-10 14:27:16 -050022*/}}
23<configuration scan="true" scanPeriod="60 seconds" debug="false">
Fiete Ostkamp42de5462024-01-04 13:56:15 +010024 <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}}' />
leilab3bfd4d2022-11-10 14:27:16 -050030
Fiete Ostkamp42de5462024-01-04 13:56:15 +010031 <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 Desbureauxa41dfc02021-02-15 10:14:22 +010041 <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder">
Fiete Ostkamp42de5462024-01-04 13:56:15 +010042 <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 Desbureauxa41dfc02021-02-15 10:14:22 +010047 </encoder>
Fiete Ostkamp42de5462024-01-04 13:56:15 +010048 </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" />
leilab3bfd4d2022-11-10 14:27:16 -050074</configuration>
75{{/*<!--
Sylvain Desbureaux70070412020-11-09 21:58:48 +010076%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 Desbureauxa41dfc02021-02-15 10:14:22 +010097-->*/}}