Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 1 | <!-- |
Sylvain Desbureaux | 47eb4d2 | 2020-12-10 12:15:27 +0100 | [diff] [blame] | 2 | {{/* |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 3 | ============LICENSE_START======================================================= |
| 4 | org.onap.aai |
| 5 | ================================================================================ |
| 6 | Copyright © 2018 AT&T Intellectual Property. All rights reserved. |
| 7 | ================================================================================ |
| 8 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | you may not use this file except in compliance with the License. |
| 10 | You may obtain a copy of the License at |
| 11 | |
| 12 | http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | |
| 14 | Unless required by applicable law or agreed to in writing, software |
| 15 | distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | See the License for the specific language governing permissions and |
| 18 | limitations under the License. |
| 19 | ============LICENSE_END========================================================= |
Sylvain Desbureaux | 47eb4d2 | 2020-12-10 12:15:27 +0100 | [diff] [blame] | 20 | */}} |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 21 | --> |
leila | 0b3f79f | 2022-11-04 18:00:11 -0400 | [diff] [blame^] | 22 | <configuration scan="true" scanPeriod="60 seconds" debug="false"> |
guillaume.lambert | 30ec390 | 2021-09-14 12:32:24 +0200 | [diff] [blame] | 23 | <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> |
leila | 0b3f79f | 2022-11-04 18:00:11 -0400 | [diff] [blame^] | 24 | <property name="maxHistory" value='{{.Values.accessLogback.maxHistory}}' /> |
| 25 | <property name="totalSizeCap" value='{{.Values.accessLogback.totalSizeCap}}' /> |
| 26 | <property name="logToFileEnabled" value='{{.Values.accessLogback.logToFileEnabled}}'/> |
| 27 | <if condition='property("logToFileEnabled").contains("true")'> |
| 28 | <then> |
| 29 | <appender name="ACCESS" |
| 30 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 31 | <file>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log</file> |
| 32 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 33 | <fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd} |
| 34 | </fileNamePattern> |
| 35 | <maxHistory>${maxHistory}</maxHistory> |
| 36 | <totalSizeCap>${totalSizeCap}</totalSizeCap> |
| 37 | </rollingPolicy> |
| 38 | <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder"> |
| 39 | <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> |
| 40 | </encoder> |
| 41 | </appender> |
| 42 | <appender-ref ref="ACCESS" /> |
| 43 | </then> |
| 44 | </if> |
| 45 | |
| 46 | <appender name="STDOUTACCESS" class="ch.qos.logback.core.ConsoleAppender"> |
guillaume.lambert | 30ec390 | 2021-09-14 12:32:24 +0200 | [diff] [blame] | 47 | <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder"> |
leila | 0b3f79f | 2022-11-04 18:00:11 -0400 | [diff] [blame^] | 48 | <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> |
guillaume.lambert | 30ec390 | 2021-09-14 12:32:24 +0200 | [diff] [blame] | 49 | </encoder> |
| 50 | </appender> |
leila | 0b3f79f | 2022-11-04 18:00:11 -0400 | [diff] [blame^] | 51 | <appender-ref ref="STDOUTACCESS" /> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 52 | </configuration> |
| 53 | |
guillaume.lambert | 30ec390 | 2021-09-14 12:32:24 +0200 | [diff] [blame] | 54 | <!-- |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 55 | %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 |
| 76 | --> |