diff options
author | Krzysztof Opasiak <k.opasiak@samsung.com> | 2020-09-02 06:24:19 +0000 |
---|---|---|
committer | Krzysztof Opasiak <k.opasiak@samsung.com> | 2020-09-02 06:24:19 +0000 |
commit | 39e8581bee5a7674fea6773dd06de87c1ff32784 (patch) | |
tree | e547609ce61be841e8129251b0411004fcb278bf /components/aai-babel | |
parent | befaa5500924f9ebda0b4bf65d8d6ab5a9f0745a (diff) |
Revert "[AAI] Add logs to STDOUT"
This reverts commit befaa5500924f9ebda0b4bf65d8d6ab5a9f0745a.
Reason for revert: Breaks the AAI HC
Change-Id: Ie401f7bdc7408ce1171bc055a3e46cb610bd52c0
Diffstat (limited to 'components/aai-babel')
-rw-r--r-- | components/aai-babel/requirements.yaml | 3 | ||||
-rw-r--r-- | components/aai-babel/resources/config/logback.xml | 85 | ||||
-rw-r--r-- | components/aai-babel/resources/fproxy/config/logback-spring.xml | 12 | ||||
-rw-r--r-- | components/aai-babel/resources/rproxy/config/logback-spring.xml | 12 | ||||
-rw-r--r-- | components/aai-babel/values.yaml | 26 |
5 files changed, 48 insertions, 90 deletions
diff --git a/components/aai-babel/requirements.yaml b/components/aai-babel/requirements.yaml index 5fcafdb..8297688 100644 --- a/components/aai-babel/requirements.yaml +++ b/components/aai-babel/requirements.yaml @@ -1,6 +1,5 @@ # Copyright © 2018 Amdocs, AT&T # Modifications Copyright © 2018 Bell Canada -# Modifications Copyright © 2020 Samsung Electronics # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,4 +19,4 @@ dependencies: # local reference to common chart, as it is # a part of this chart's package and will not # be published independently to a repo (at this point) - repository: '@local'
\ No newline at end of file + repository: '@local' diff --git a/components/aai-babel/resources/config/logback.xml b/components/aai-babel/resources/config/logback.xml index b8e8ad0..878d8c0 100644 --- a/components/aai-babel/resources/config/logback.xml +++ b/components/aai-babel/resources/config/logback.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- # Copyright © 2018 Amdocs, Bell Canada, AT&T -# Modifications Copyright © 2020 Samsung Electronics # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,7 +19,7 @@ <include resource="org/springframework/boot/logging/logback/base.xml" /> <property name="componentName" value="AAI-BAS" /> - <property name="logDirectory" value="{{ .Values.log.logDir }}/${componentName}" /> + <property name="logDirectory" value="/var/log/onap/${componentName}" /> <!-- default EELF log file names --> <property name="generalLogName" value="error" /> @@ -28,13 +27,6 @@ <property name="auditLogName" value="audit" /> <property name="debugLogName" value="debug" /> - <property name="p_tim" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}"/> - <property name="p_lvl" value="%level"/> - <property name="p_log" value="%logger"/> - <property name="p_mdc" value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}"/> - <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/> - <property name="p_thr" value="%thread"/> - <property name="errorLogPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%mdc{RequestId}|%thread|%mdc{ServiceName}|%mdc{PartnerName}|%mdc{TargetEntity}|%mdc{TargetServiceName}|%.-5level|%logger|%mdc{ClassName}|%msg%n" /> @@ -44,9 +36,6 @@ <property name="metricsLogPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%mdc{BeginTimestamp}|%mdc{EndTimestamp}|%mdc{RequestId}|%mdc{ServiceInstanceId}|%thread|%mdc{ServerFQDN}|%mdc{ServiceName}|%mdc{PartnerName}|%mdc{TargetEntity}|%mdc{TargetServiceName}|%mdc{StatusCode}|%mdc{ResponseCode}|%mdc{ResponseDescription}|%logger|%.-5level|||%mdc{ElapsedTime}|%mdc{RemoteHost}|%mdc{ClientAddress}|%mdc{ClassName}|||%msg%n" /> - <!-- Console (human-readable) logging --> - <property name="consolePattern" value="{{ .Values.log.consolePattern.babel.config }}"/> - <!-- ============================================================================ --> <!-- EELF Appenders --> <!-- ============================================================================ --> @@ -142,72 +131,64 @@ <includeCallerData>false</includeCallerData> </appender> - <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> - <encoder> - <pattern>${consolePattern}</pattern> - </encoder> - </appender> + <!-- ============================================================================ --> + <!-- Default / root appenders --> + <!-- This determines the logging level for 3rd party code --> + <!-- ============================================================================ --> + + <root level="INFO"> + <appender-ref ref="asyncEELF" /> + <appender-ref ref="asyncEELFDebug" /> +</root> <!-- ============================================================================ --> <!-- EELF loggers --> <!-- ============================================================================ --> <logger name="com.att.eelf" level="INFO" additivity="false"> - <appender-ref ref="asyncEELF" /> - </logger> + <appender-ref ref="asyncEELF" /> +</logger> <!-- The level of this logger determines the contents of the debug log --> <logger name="com.att.eelf.debug" level="INFO" additivity="false"> - <appender-ref ref="asyncEELFDebug" /> - </logger> + <appender-ref ref="asyncEELFDebug" /> +</logger> <logger name="com.att.eelf.audit" level="INFO" additivity="false"> - <appender-ref ref="asyncEELFAudit" /> - </logger> + <appender-ref ref="asyncEELFAudit" /> +</logger> <logger name="com.att.eelf.metrics" level="INFO" additivity="false"> - <appender-ref ref="asyncEELFMetrics" /> - </logger> + <appender-ref ref="asyncEELFMetrics" /> +</logger> <!-- ============================================================================ --> <!-- Non-EELF loggers --> <!-- ============================================================================ --> <!-- ATT packages including DMAAP message routing --> - <logger name="com.att" level="{{.Values.log.logger.att}}" /> + <logger name="com.att" level="INFO" /> <!-- Spring related loggers --> - <logger name="org.springframework" level="{{.Values.log.logger.springframework}}" /> - <logger name="org.springframework.beans" level="{{.Values.log.logger.springframeworkBeans}}" /> - <logger name="org.springframework.web" level="{{.Values.log.logger.springframeworkWeb}}" /> + <logger name="org.springframework" level="WARN" /> + <logger name="org.springframework.beans" level="WARN" /> + <logger name="org.springframework.web" level="WARN" /> <!-- Other Loggers that may help troubleshoot --> - <logger name="org.apache" level="{{.Values.log.logger.apache}}" /> - <logger name="org.apache.commons" level="{{.Values.log.logger.apacheCommons}}" /> + <logger name="org.apache" level="WARN" /> + <logger name="org.apache.commons" level="WARN" /> <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging. May aid in troubleshooting) --> - <logger name="org.apache.camel" level="{{.Values.log.logger.apacheCamel}}" /> - <logger name="org.apache.cxf" level="{{.Values.log.logger.apacheCxf}}" /> - <logger name="org.apache.camel.processor.interceptor" level="{{.Values.log.logger.apacheCamelProcessorInterceptor}}" /> - <logger name="org.apache.cxf.jaxrs.interceptor" level="{{.Values.log.logger.apacheCxfJaxrsInterceptor}}" /> - <logger name="org.apache.cxf.service" level="{{.Values.log.logger.apacheCxfService}}" /> - <logger name="org.apache.camel.component.restlet" level="{{.Values.log.logger.apacheCamelComponentRestlet}}" /> - - <logger name="org.restlet" level="{{.Values.log.logger.restlet}}" /> + <logger name="org.apache.camel" level="WARN" /> + <logger name="org.apache.cxf" level="WARN" /> + <logger name="org.apache.camel.processor.interceptor" level="WARN" /> + <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" /> + <logger name="org.apache.cxf.service" level="WARN" /> + <logger name="org.restlet" level="WARN" /> + <logger name="org.apache.camel.component.restlet" level="WARN" /> <!-- logback internals logging --> - <logger name="ch.qos.logback.classic" level="{{.Values.log.logger.qosLogbackClassic}}" /> - <logger name="ch.qos.logback.core" level="{{.Values.log.logger.qosLogbackCore}}" /> - - <!-- ============================================================================ --> - <!-- Default / root appenders --> - <!-- This determines the logging level for 3rd party code --> - <!-- ============================================================================ --> - - <root level="{{ .Values.log.root.level }}"> - <appender-ref ref="asyncEELF" /> - <appender-ref ref="asyncEELFDebug" /> - <appender-ref ref="STDOUT" /> - </root> + <logger name="ch.qos.logback.classic" level="WARN" /> + <logger name="ch.qos.logback.core" level="WARN" /> </configuration> diff --git a/components/aai-babel/resources/fproxy/config/logback-spring.xml b/components/aai-babel/resources/fproxy/config/logback-spring.xml index aa37596..0637cfb 100644 --- a/components/aai-babel/resources/fproxy/config/logback-spring.xml +++ b/components/aai-babel/resources/fproxy/config/logback-spring.xml @@ -4,10 +4,12 @@ <property name="LOGS" value="./logs/AAF-FPS" /> <property name="FILEPREFIX" value="application" /> - <appender name="STDOUT" + <appender name="Console" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> - <Pattern>{{ .Values.log.consolePattern.babel.froxy }}</Pattern> + <Pattern> + %d{ISO8601} %-5level [%t] %C{1.}: %msg%n%throwable + </Pattern> </layout> </appender> @@ -32,12 +34,12 @@ </appender> <!-- LOG everything at INFO level --> - <root level="{{ .Values.log.root.level }}"> + <root level="info"> <appender-ref ref="RollingFile" /> - <appender-ref ref="STDOUT" /> + <appender-ref ref="Console" /> </root> <!-- LOG "com.baeldung*" at TRACE level --> - <logger name="org.onap.aaf.fproxy" level="INFO" /> + <logger name="org.onap.aaf.fproxy" level="info" /> </configuration>
\ No newline at end of file diff --git a/components/aai-babel/resources/rproxy/config/logback-spring.xml b/components/aai-babel/resources/rproxy/config/logback-spring.xml index 368367d..2cd95d4 100644 --- a/components/aai-babel/resources/rproxy/config/logback-spring.xml +++ b/components/aai-babel/resources/rproxy/config/logback-spring.xml @@ -4,10 +4,12 @@ <property name="LOGS" value="./logs/reverse-proxy" /> <property name="FILEPREFIX" value="application" /> - <appender name="STDOUT" + <appender name="Console" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> - <Pattern>{{ .Values.log.consolePattern.babel.rproxy }}</Pattern> + <Pattern> + %d{ISO8601} %-5level [%t] %C{1.}: %msg%n%throwable + </Pattern> </layout> </appender> @@ -32,12 +34,12 @@ </appender> <!-- LOG everything at INFO level --> - <root level="{{ .Values.log.root.level }}"> + <root level="info"> <appender-ref ref="RollingFile" /> - <appender-ref ref="STDOUT" /> + <appender-ref ref="Console" /> </root> <!-- LOG "com.baeldung*" at TRACE level --> - <logger name="org.onap.aaf.rproxy" level="INFO" /> + <logger name="org.onap.aaf.rproxy" level="info" /> </configuration> diff --git a/components/aai-babel/values.yaml b/components/aai-babel/values.yaml index d2eeb6c..6f2c033 100644 --- a/components/aai-babel/values.yaml +++ b/components/aai-babel/values.yaml @@ -68,32 +68,6 @@ ingress: config: ssl: "redirect" -log: - logDir: {{ .Values.log.logDir }} - root: - level: {{ .Values.log.root.level.babel }} - consolePattern: - babel: - config: {{ .Values.log.consolePattern.babel.config }} - froxy: {{ .Values.log.consolePattern.babel.froxy }} - rproxy: {{ .Values.log.consolePattern.babel.rproxy }} - logger: - apache: {{ .Values.log.logger.apache }} - apacheCamel: {{ .Values.log.logger.apacheCamel }} - apacheCamelComponentRestlet: {{ .Values.log.logger.apacheCamelComponentRestlet }} - apacheCamelProcessorInterceptor: {{ .Values.log.logger.apacheCamelProcessorInterceptor }} - apacheCommons: {{ .Values.log.logger.apacheCommons }} - apacheCxf: {{ .Values.log.logger.apacheCxf }} - apacheCxfJaxrsInterceptor: {{ .Values.log.logger.apacheCxfJaxrsInterceptor }} - apacheCxfService: {{ .Values.log.logger.apacheCxfService }} - att: {{ .Values.log.logger.att }} - qosLogbackClassic: {{ .Values.log.logger.qosLogbackClassic }} - qosLogbackCore: {{ .Values.log.logger.qosLogbackCore }} - restlet: {{ .Values.log.logger.restlet }} - springframework: {{ .Values.log.logger.springframework }} - springframeworkBeans: {{ .Values.log.logger.springframeworkBeans }} - springframeworkWeb: {{ .Values.log.logger.springframeworkWeb }} - resources: small: limits: |