diff options
author | Fiachra Corcoran <fiachra.corcoran@est.tech> | 2022-11-09 13:51:13 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2022-11-09 13:51:13 +0000 |
commit | 2e726313676ba6fa39c7de5caf6e1c6ab2e3c887 (patch) | |
tree | 7842c6ae190adc34c0d00332b34961f84b0fbd1e /kubernetes/aai/components/aai-graphadmin/resources/config/localhost-access-logback.xml | |
parent | 1735ebc9d275f450c8043567e8e861e8206459ac (diff) | |
parent | 0b3f79fc9ce0571e389079b164cab675a6cc7645 (diff) |
Merge "[AAI] OOM AAI graphadmin logging structure enhancement"
Diffstat (limited to 'kubernetes/aai/components/aai-graphadmin/resources/config/localhost-access-logback.xml')
-rw-r--r-- | kubernetes/aai/components/aai-graphadmin/resources/config/localhost-access-logback.xml | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/kubernetes/aai/components/aai-graphadmin/resources/config/localhost-access-logback.xml b/kubernetes/aai/components/aai-graphadmin/resources/config/localhost-access-logback.xml index 449ea3032c..8e1bf21c95 100644 --- a/kubernetes/aai/components/aai-graphadmin/resources/config/localhost-access-logback.xml +++ b/kubernetes/aai/components/aai-graphadmin/resources/config/localhost-access-logback.xml @@ -19,20 +19,36 @@ ============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" /> + <appender-ref ref="STDOUTACCESS" /> </configuration> <!-- |