blob: 5ddd293658b8e1563a76cbc6487e923caee2eeeb [file] [log] [blame]
Sylvain Desbureaux47eb4d22020-12-10 12:15:27 +01001{{/*
Sylvain Desbureaux70070412020-11-09 21:58:48 +01002<!--
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 Desbureaux47eb4d22020-12-10 12:15:27 +010026*/}}
Sylvain Desbureaux70070412020-11-09 21:58:48 +010027<configuration>
Sylvain Desbureauxb4e038d2020-12-15 12:00:26 +010028 <property name="AJSC_HOME" value="${AJSC_HOME:-.}" />
Rommel Pawarc03db782022-09-21 16:16:12 -070029
30 <property name="logToFileEnabled" value='{{.Values.accessLogback.logToFileEnabled}}'/>
31 <property name="maxHistory" value='{{.Values.accessLogback.maxHistory}}' />
32 <property name="totalSizeCap" value='{{.Values.accessLogback.totalSizeCap}}' />
33
34 <if condition='property("logToFileEnabled").contains("true")'>
35 <then>
36 <appender name="ACCESS"
37 class="ch.qos.logback.core.rolling.RollingFileAppender">
38 <file>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log</file>
39 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
40 <fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd}.zip
41 </fileNamePattern>
42 <maxHistory>${maxHistory}</maxHistory>
43 <totalSizeCap>${totalSizeCap}</totalSizeCap>
44 </rollingPolicy>
45 <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder">
46 <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>
47 </encoder>
48 </appender>
49 <appender-ref ref="ACCESS"/>
50 </then>
51 </if>
52
53 <appender name="STDOUTACCESS" class="ch.qos.logback.core.ConsoleAppender">
Sylvain Desbureauxb4e038d2020-12-15 12:00:26 +010054 <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder">
Rommel Pawarc03db782022-09-21 16:16:12 -070055 <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 Desbureauxb4e038d2020-12-15 12:00:26 +010056 </encoder>
57 </appender>
Rommel Pawarc03db782022-09-21 16:16:12 -070058
59 <appender-ref ref="STDOUTACCESS" />
60
Sylvain Desbureaux70070412020-11-09 21:58:48 +010061</configuration>
Sylvain Desbureaux47eb4d22020-12-10 12:15:27 +010062{{/*
Sylvain Desbureauxb4e038d2020-12-15 12:00:26 +010063<!--
Sylvain Desbureaux70070412020-11-09 21:58:48 +010064%a - Remote IP address
65%A - Local IP address
66%b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent
67%B - Bytes sent, excluding HTTP headers
68%h - Remote host name
69%H - Request protocol
70%l - Remote logical username from identd (always returns '-')
71%m - Request method
72%p - Local port
73%q - Query string (prepended with a '?' if it exists, otherwise an empty string
74%r - First line of the request
75%s - HTTP status code of the response
76%S - User session ID
77%t - Date and time, in Common Log Format format
78%u - Remote user that was authenticated
79%U - Requested URL path
80%v - Local server name
81%I - current request thread name (can compare later with stacktraces)
82
83%z - Custom pattern that parses the cert for the subject
84%y - Custom pattern determines rest or dme2
Sylvain Desbureauxb4e038d2020-12-15 12:00:26 +010085-->
86*/}}
87