diff options
author | Ajith Sreekumar <ajith.sreekumar@bell.ca> | 2021-08-09 12:50:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-08-09 12:50:31 +0000 |
commit | 8a2f14ae90528454c4aa2351f8f4c1e04eaed2b6 (patch) | |
tree | ed0435840f311deb55b5744a64fcb1b4fde78a9d /runtime/src/main/resources | |
parent | 522f98830955eeef3a2e602b855d2af01bafe941 (diff) | |
parent | 4aa0eb0bae6353408e9a82d8f07af1703ccaf9d3 (diff) |
Merge "Use slf4j instead of EELFLogger in Clamp"
Diffstat (limited to 'runtime/src/main/resources')
-rw-r--r-- | runtime/src/main/resources/application-noaaf.properties | 2 | ||||
-rw-r--r-- | runtime/src/main/resources/application.properties | 2 | ||||
-rw-r--r-- | runtime/src/main/resources/logback-default.xml | 64 |
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> |