[AAI] Make aai log level configurable
- introduce log.level.root setting to set root log level
Issue-ID: AAI-3846
Change-Id: Ia6d39f7e70605ccc7bfd64830bdfe8aa55058f3f
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
diff --git a/kubernetes/aai/components/aai-babel/resources/config/logback.xml b/kubernetes/aai/components/aai-babel/resources/config/logback.xml
index 125731c..686423b 100644
--- a/kubernetes/aai/components/aai-babel/resources/config/logback.xml
+++ b/kubernetes/aai/components/aai-babel/resources/config/logback.xml
@@ -131,7 +131,7 @@
<!-- This determines the logging level for 3rd party code -->
<!-- ============================================================================ -->
- <root level="INFO">
+ <root level={{ .Values.log.level.root | upper | quote }}>
<appender-ref ref="asyncEELF" />
<appender-ref ref="asyncEELFDebug" />
<appender-ref ref="AsyncSysOut" />
diff --git a/kubernetes/aai/components/aai-babel/values.yaml b/kubernetes/aai/components/aai-babel/values.yaml
index e058d82..579289a 100644
--- a/kubernetes/aai/components/aai-babel/values.yaml
+++ b/kubernetes/aai/components/aai-babel/values.yaml
@@ -104,4 +104,6 @@
#Log configuration
log:
path: /var/log/onap
+ level:
+ root: INFO
logConfigMapNamePrefix: '{{ include "common.fullname" . }}'
diff --git a/kubernetes/aai/components/aai-graphadmin/resources/config/logback.xml b/kubernetes/aai/components/aai-graphadmin/resources/config/logback.xml
index fd79f70..f30fd2d 100644
--- a/kubernetes/aai/components/aai-graphadmin/resources/config/logback.xml
+++ b/kubernetes/aai/components/aai-graphadmin/resources/config/logback.xml
@@ -851,7 +851,7 @@
</then>
</if>
- <logger name="org.onap.aai" level="DEBUG" additivity="false">
+ <logger name="org.onap.aai" level={{ .Values.log.level.base | upper | quote }} additivity="false">
<if condition='property("logToFileEnabled").contains("true")'>
<then>
<appender-ref ref="asyncDEBUG"/>
@@ -1185,7 +1185,7 @@
</if>
<appender-ref ref="STDOUT"/>
</logger>
- <root level="DEBUG">
+ <root level={{ .Values.log.level.root | upper | quote }}>
<if condition='property("logToFileEnabled").contains("true")'>
<then>
<appender-ref ref="external"/>
diff --git a/kubernetes/aai/components/aai-graphadmin/values.yaml b/kubernetes/aai/components/aai-graphadmin/values.yaml
index 8b6b5f9..d3609a9 100644
--- a/kubernetes/aai/components/aai-graphadmin/values.yaml
+++ b/kubernetes/aai/components/aai-graphadmin/values.yaml
@@ -291,4 +291,7 @@
#Log configuration
log:
path: /var/log/onap
+ level:
+ root: DEBUG
+ base: DEBUG
logConfigMapNamePrefix: '{{ include "common.fullname" . }}'
diff --git a/kubernetes/aai/components/aai-modelloader/resources/config/log/logback.xml b/kubernetes/aai/components/aai-modelloader/resources/config/log/logback.xml
index 129af8f..dd8da59 100644
--- a/kubernetes/aai/components/aai-modelloader/resources/config/log/logback.xml
+++ b/kubernetes/aai/components/aai-modelloader/resources/config/log/logback.xml
@@ -163,10 +163,9 @@
<logger name="ch.qos.logback.classic" level="WARN" />
<logger name="ch.qos.logback.core" level="WARN" />
- <root>
+ <root level={{ .Values.log.level.root | upper | quote }}>
<appender-ref ref="asyncEELF" />
<appender-ref ref="AsyncSysOut" />
- <!-- <appender-ref ref="asyncEELFDebug" /> -->
</root>
</configuration>
diff --git a/kubernetes/aai/components/aai-modelloader/values.yaml b/kubernetes/aai/components/aai-modelloader/values.yaml
index ab3d864..97f489f 100644
--- a/kubernetes/aai/components/aai-modelloader/values.yaml
+++ b/kubernetes/aai/components/aai-modelloader/values.yaml
@@ -102,4 +102,6 @@
#Log configuration
log:
path: /var/log/onap
+ level:
+ root: INFO
logConfigMapNamePrefix: '{{ include "common.fullname" . }}'
diff --git a/kubernetes/aai/components/aai-resources/resources/config/logback.xml b/kubernetes/aai/components/aai-resources/resources/config/logback.xml
index b523185..8d18640 100644
--- a/kubernetes/aai/components/aai-resources/resources/config/logback.xml
+++ b/kubernetes/aai/components/aai-resources/resources/config/logback.xml
@@ -363,7 +363,7 @@
<logger name="org.zookeeper" level="OFF" />
- <logger name="org.onap.aai" level="DEBUG" additivity="false">
+ <logger name="org.onap.aai" level={{ .Values.log.level.base | upper | quote }} additivity="false">
<if condition='property("logToFileEnabled").contains("true")'>
<then>
<appender-ref ref="asyncDEBUG"/>
@@ -425,7 +425,7 @@
<appender-ref ref="STDOUT"/>
</logger>
- <root level="DEBUG">
+ <root level={{ .Values.log.level.root | upper | quote }}>
<if condition='property("logToFileEnabled").contains("true")'>
<then>
<appender-ref ref="external"/>
diff --git a/kubernetes/aai/components/aai-resources/values.yaml b/kubernetes/aai/components/aai-resources/values.yaml
index b1d3202..3023d86 100644
--- a/kubernetes/aai/components/aai-resources/values.yaml
+++ b/kubernetes/aai/components/aai-resources/values.yaml
@@ -360,6 +360,9 @@
#Log configuration
log:
path: /var/log/onap
+ level:
+ root: DEBUG
+ base: DEBUG # base package (org.onap.aai)
logConfigMapNamePrefix: '{{ include "common.fullname" . }}'
# To make logback capping values configurable
diff --git a/kubernetes/aai/components/aai-traversal/resources/config/logback.xml b/kubernetes/aai/components/aai-traversal/resources/config/logback.xml
index 3dc4867..acdc893 100644
--- a/kubernetes/aai/components/aai-traversal/resources/config/logback.xml
+++ b/kubernetes/aai/components/aai-traversal/resources/config/logback.xml
@@ -332,7 +332,7 @@
<logger name="org.zookeeper" level="OFF" />
- <logger name="org.onap.aai" level="DEBUG" additivity="false">
+ <logger name="org.onap.aai" level={{ .Values.log.level.base | upper | quote }} additivity="false">
<if condition='property("logToFileEnabled").contains("true")'>
<then>
<appender-ref ref="asyncDEBUG" />
@@ -424,7 +424,7 @@
<appender-ref ref="STDOUT" />
</logger>
- <root level="DEBUG">
+ <root level={{ .Values.log.level.root | upper | quote }}>
<if condition='property("logToFileEnabled").contains("true")'>
<then>
<appender-ref ref="external" />
diff --git a/kubernetes/aai/components/aai-traversal/values.yaml b/kubernetes/aai/components/aai-traversal/values.yaml
index aca1ec7..f6194b8 100644
--- a/kubernetes/aai/components/aai-traversal/values.yaml
+++ b/kubernetes/aai/components/aai-traversal/values.yaml
@@ -368,4 +368,7 @@
#Log configuration
log:
path: /var/log/onap
+ level:
+ root: DEBUG
+ base: DEBUG # base package (org.onap.aai)
logConfigMapNamePrefix: '{{ include "common.fullname" . }}'