aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/aai/components/aai-traversal/resources/config/localhost-access-logback.xml
diff options
context:
space:
mode:
authorleila <leila.nishimwe@bell.ca>2022-11-10 14:27:16 -0500
committerFiachra Corcoran <fiachra.corcoran@est.tech>2022-11-18 16:08:08 +0000
commit66761c8f1c9908817a9db620850a3476f6f27a43 (patch)
tree8f1d10335804cbc00bc06918c9cde952142d4545 /kubernetes/aai/components/aai-traversal/resources/config/localhost-access-logback.xml
parent0ebd1ae06259318d72ef7b9f14f83e5b3db11870 (diff)
[AAI] OOM AAI traversal logging structure enhancement
logback and localhost xml file structure enhancement image updated for aai traversal Issue-ID: AAI-3584 Signed-off-by: leila <leila.nishimwe@bell.ca> Change-Id: I0aa21a463a85bff0407df6c6793baba53d1da3b1 (cherry picked from commit b3bfd4d52655be650932d523208dee35fec66b93)
Diffstat (limited to 'kubernetes/aai/components/aai-traversal/resources/config/localhost-access-logback.xml')
-rw-r--r--kubernetes/aai/components/aai-traversal/resources/config/localhost-access-logback.xml39
1 files changed, 29 insertions, 10 deletions
diff --git a/kubernetes/aai/components/aai-traversal/resources/config/localhost-access-logback.xml b/kubernetes/aai/components/aai-traversal/resources/config/localhost-access-logback.xml
index b801a7ae5f..1d32a521a1 100644
--- a/kubernetes/aai/components/aai-traversal/resources/config/localhost-access-logback.xml
+++ b/kubernetes/aai/components/aai-traversal/resources/config/localhost-access-logback.xml
@@ -19,20 +19,39 @@
limitations under the License.
============LICENSE_END=========================================================
-->
-*/}}<configuration>
+*/}}
+<configuration scan="true" scanPeriod="60 seconds" debug="false">
<property name="AJSC_HOME" value="${AJSC_HOME:-.}" />
- <appender name="ACCESS" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd}
-</fileNamePattern>
- </rollingPolicy>
+ <property name="maxHistory" value='{{.Values.accessLogback.maxHistory}}' />
+ <property name="totalSizeCap" value='{{.Values.accessLogback.totalSizeCap}}' />
+ <property name="logToFileEnabled" value='{{.Values.accessLogback.logToFileEnabled}}'/>
+
+ <if condition='property("logToFileEnabled").contains("true")'>
+ <then>
+ <appender name="ACCESS" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log</file>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd}
+ </fileNamePattern>
+ <maxHistory>${maxHistory}</maxHistory>
+ <totalSizeCap>${totalSizeCap}</totalSizeCap>
+ </rollingPolicy>
+ <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder">
+ <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>
+ </encoder>
+ </appender>
+ <appender-ref ref="ACCESS" />
+ </then>
+ </if>
+
+ <appender name="STDOUTACCESS" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder">
- <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>
+ <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>
</encoder>
</appender>
- <appender-ref ref="ACCESS" />
-</configuration>{{/*<!--
+ <appender-ref ref="STDOUTACCESS" />
+</configuration>
+{{/*<!--
%a - Remote IP address
%A - Local IP address
%b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent