blob: 1d32a521a14169efc141f7f711e84699a777a94f [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">
Sylvain Desbureauxa41dfc02021-02-15 10:14:22 +010024 <property name="AJSC_HOME" value="${AJSC_HOME:-.}" />
leilab3bfd4d2022-11-10 14:27:16 -050025 <property name="maxHistory" value='{{.Values.accessLogback.maxHistory}}' />
26 <property name="totalSizeCap" value='{{.Values.accessLogback.totalSizeCap}}' />
27 <property name="logToFileEnabled" value='{{.Values.accessLogback.logToFileEnabled}}'/>
28
29 <if condition='property("logToFileEnabled").contains("true")'>
30 <then>
31 <appender name="ACCESS" class="ch.qos.logback.core.rolling.RollingFileAppender">
32 <file>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log</file>
33 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
34 <fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd}
35 </fileNamePattern>
36 <maxHistory>${maxHistory}</maxHistory>
37 <totalSizeCap>${totalSizeCap}</totalSizeCap>
38 </rollingPolicy>
39 <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder">
40 <Pattern>%a %u %z [%t] "%m %U%q" %s %b %y %i{X-TransactionId} %i{X-FromAppId} %i{X-Forwarded-For} %i{X-AAI-SSL-Client-CN} %i{X-AAI-SSL-Client-OU} %i{X-AAI-SSL-Client-O} %i{X-AAI-SSL-Client-L} %i{X-AAI-SSL-Client-ST} %i{X-AAI-SSL-Client-C} %i{X-AAI-SSL-Client-NotBefore} %i{X-AAI-SSL-Client-NotAfter} %i{X-AAI-SSL-Client-DN} %D</Pattern>
41 </encoder>
42 </appender>
43 <appender-ref ref="ACCESS" />
44 </then>
45 </if>
46
47 <appender name="STDOUTACCESS" class="ch.qos.logback.core.ConsoleAppender">
Sylvain Desbureauxa41dfc02021-02-15 10:14:22 +010048 <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder">
leilab3bfd4d2022-11-10 14:27:16 -050049 <Pattern>%a %u %z [%t] "%m %U%q" %s %b %y %i{X-TransactionId} %i{X-FromAppId} %i{X-Forwarded-For} %i{X-AAI-SSL-Client-CN} %i{X-AAI-SSL-Client-OU} %i{X-AAI-SSL-Client-O} %i{X-AAI-SSL-Client-L} %i{X-AAI-SSL-Client-ST} %i{X-AAI-SSL-Client-C} %i{X-AAI-SSL-Client-NotBefore} %i{X-AAI-SSL-Client-NotAfter} %i{X-AAI-SSL-Client-DN} %D - "logType": "access"</Pattern>
Sylvain Desbureauxa41dfc02021-02-15 10:14:22 +010050 </encoder>
51 </appender>
leilab3bfd4d2022-11-10 14:27:16 -050052 <appender-ref ref="STDOUTACCESS" />
53</configuration>
54{{/*<!--
Sylvain Desbureaux70070412020-11-09 21:58:48 +010055%a - Remote IP address
56%A - Local IP address
57%b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent
58%B - Bytes sent, excluding HTTP headers
59%h - Remote host name
60%H - Request protocol
61%l - Remote logical username from identd (always returns '-')
62%m - Request method
63%p - Local port
64%q - Query string (prepended with a '?' if it exists, otherwise an empty string
65%r - First line of the request
66%s - HTTP status code of the response
67%S - User session ID
68%t - Date and time, in Common Log Format format
69%u - Remote user that was authenticated
70%U - Requested URL path
71%v - Local server name
72%I - current request thread name (can compare later with stacktraces)
73
74%z - Custom pattern that parses the cert for the subject
75%y - Custom pattern determines rest or dme2
Sylvain Desbureauxa41dfc02021-02-15 10:14:22 +010076-->*/}}