summaryrefslogtreecommitdiffstats
path: root/runtime/src/main/resources
diff options
context:
space:
mode:
authorTaka Cho <takamune.cho@att.com>2021-07-27 16:36:13 -0400
committerTaka Cho <takamune.cho@att.com>2021-08-05 13:58:43 -0400
commit4aa0eb0bae6353408e9a82d8f07af1703ccaf9d3 (patch)
tree4aa872889cc53d276e49a2130b2eb688d06c27a1 /runtime/src/main/resources
parent931424fc681b1d41afbba98a190253283f9a6eba (diff)
Use slf4j instead of EELFLogger in Clamp
replace EELF with slf4j logback using slf4j Marker from common repo Issue-ID: POLICY-3087 Change-Id: I56b43584b1603d9eba642c1cd6ef6190526d078b Signed-off-by: Taka Cho <takamune.cho@att.com>
Diffstat (limited to 'runtime/src/main/resources')
-rw-r--r--runtime/src/main/resources/application-noaaf.properties2
-rw-r--r--runtime/src/main/resources/application.properties2
-rw-r--r--runtime/src/main/resources/logback-default.xml64
3 files changed, 22 insertions, 46 deletions
diff --git a/runtime/src/main/resources/application-noaaf.properties b/runtime/src/main/resources/application-noaaf.properties
index e698cc0ce..12a08704f 100644
--- a/runtime/src/main/resources/application-noaaf.properties
+++ b/runtime/src/main/resources/application-noaaf.properties
@@ -134,7 +134,7 @@ async.core.pool.size=10
async.max.pool.size=20
async.queue.capacity=500
-#For EELF logback file
+#For logback file
#clamp.config.logback.path=
clamp.config.logback.filename=logback-default.xml
#The log folder that will be used in logback.xml file
diff --git a/runtime/src/main/resources/application.properties b/runtime/src/main/resources/application.properties
index 64097e88e..08260047e 100644
--- a/runtime/src/main/resources/application.properties
+++ b/runtime/src/main/resources/application.properties
@@ -134,7 +134,7 @@ async.core.pool.size=10
async.max.pool.size=20
async.queue.capacity=500
-#For EELF logback file
+#For logback file
#clamp.config.logback.path=
clamp.config.logback.filename=logback-default.xml
#The log folder that will be used in logback.xml file
diff --git a/runtime/src/main/resources/logback-default.xml b/runtime/src/main/resources/logback-default.xml
index 1d7b2a14f..f8ce5ae41 100644
--- a/runtime/src/main/resources/logback-default.xml
+++ b/runtime/src/main/resources/logback-default.xml
@@ -53,6 +53,10 @@
<totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
</appender>
+ <appender name="asyncError" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="ERROR" />
+ </appender>
<appender name="DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logDirectory}/debug.log</file>
@@ -69,19 +73,14 @@
<totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
</appender>
-
+ <appender name="asyncDebug" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="DEBUG" />
+ </appender>
<appender name="AUDIT" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
- <marker>ENTRY</marker>
- <marker>EXIT</marker>
- </evaluator>
- <onMismatch>DENY</onMismatch>
- <onMatch>ACCEPT</onMatch>
- </filter>
+ <filter class="org.onap.policy.clamp.clds.util.LoggerMarkerFilter$AuditLoggerMarkerFilter" />
<file>${logDirectory}/audit.log</file>
- <append>true</append>
<encoder>
<pattern>${auditPattern}</pattern>
</encoder>
@@ -93,22 +92,14 @@
<totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
</appender>
- <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
+ <appender name="asyncAudit" class="ch.qos.logback.classic.AsyncAppender">
<queueSize>256</queueSize>
<appender-ref ref="AUDIT" />
</appender>
<appender name="METRIC" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
- <marker>INVOKE</marker>
- <marker>INVOKE-RETURN</marker>
- </evaluator>
- <onMismatch>DENY</onMismatch>
- <onMatch>ACCEPT</onMatch>
- </filter>
+ <filter class="org.onap.policy.clamp.clds.util.LoggerMarkerFilter$MetricLoggerMarkerFilter" />
<file>${logDirectory}/metric.log</file>
- <append>true</append>
<encoder>
<pattern>${metricPattern}</pattern>
</encoder>
@@ -120,16 +111,15 @@
<totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
</appender>
-
- <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
+ <appender name="asyncMetric" class="ch.qos.logback.classic.AsyncAppender">
<queueSize>256</queueSize>
<appender-ref ref="METRIC" />
</appender>
<!-- SECURITY related loggers -->
<appender name="SECURITY" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <filter class="org.onap.policy.clamp.clds.util.LoggerMarkerFilter$SecurityLoggerMarkerFilter" />
<file>${logDirectory}/security.log</file>
- <append>true</append>
<encoder>
<pattern>%X{EntryTimestamp}|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%.20thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n
</pattern>
@@ -142,11 +132,11 @@
<totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
</appender>
-
- <appender name="asyncEELFSecurity" class="ch.qos.logback.classic.AsyncAppender">
+ <appender name="asyncSecurity" class="ch.qos.logback.classic.AsyncAppender">
<queueSize>256</queueSize>
<appender-ref ref="SECURITY" />
</appender>
+
<!-- logback jms appenders & loggers definition starts here -->
<appender name="auditLogs" class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
@@ -204,20 +194,6 @@
<appender-ref ref="DEBUG" />
</logger>
- <logger name="com.att.eelf.error" level="OFF">
- <appender-ref ref="ERROR" />
- </logger>
- <!-- EELF related loggers -->
- <logger name="com.att.eelf.audit" level="INFO" additivity="false">
- <appender-ref ref="asyncEELFAudit" />
- </logger>
- <logger name="com.att.eelf.metrics" level="DEBUG" additivity="false">
- <appender-ref ref="asyncEELFMetrics" />
- </logger>
- <logger name="com.att.eelf.security" level="DEBUG" additivity="false">
- <appender-ref ref="asyncEELFSecurity" />
- </logger>
-
<!-- logback internals logging -->
<logger name="ch.qos.logback.classic" level="INFO" />
<logger name="ch.qos.logback.core" level="INFO" />
@@ -233,10 +209,10 @@
<!-- logback jms appenders & loggers definition ends here -->
<root level="DEBUG">
- <appender-ref ref="DEBUG" />
- <appender-ref ref="STDOUT" />
- <appender-ref ref="AUDIT" />
- <appender-ref ref="METRIC" />
- <appender-ref ref="ERROR" />
+ <appender-ref ref="asyncDebug" />
+ <appender-ref ref="asyncError" />
+ <appender-ref ref="asyncAudit" />
+ <appender-ref ref="asyncMetric" />
+ <appender-ref ref="asyncSecurity" />
</root>
</included>