diff options
author | Christopher Lott (cl778h) <clott@research.att.com> | 2017-05-09 14:24:20 -0400 |
---|---|---|
committer | Christopher Lott (cl778h) <clott@research.att.com> | 2017-05-09 14:44:09 -0400 |
commit | e2aefda183de4f1c1256d97f7ce09f8bee5477db (patch) | |
tree | 4b0eaf3f153df90591711daf081e63a8b20ace74 /dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/fusionapp/util/CustomLoggingFilter.java | |
parent | 472635713b7471b300a988db7e907bab0119eaee (diff) |
[ONAP-rebase] Rebase as 1.1.0-SNAPSHOT
Consolidate into a single maven project; no more separate model and client jars.
Change-Id: Ibbba982250b74c0dfd09ee1c65c0fb6c158dd632
Signed-off-by: Christopher Lott <cl778h@att.com>
Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/fusionapp/util/CustomLoggingFilter.java')
-rw-r--r-- | dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/fusionapp/util/CustomLoggingFilter.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/fusionapp/util/CustomLoggingFilter.java b/dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/fusionapp/util/CustomLoggingFilter.java new file mode 100644 index 0000000..4562584 --- /dev/null +++ b/dcae_dmaapbc_webapp/dbca-common/src/main/java/org/openecomp/fusionapp/util/CustomLoggingFilter.java @@ -0,0 +1,37 @@ +package org.openecomp.fusionapp.util; + +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.spi.ILoggingEvent; +import ch.qos.logback.core.filter.Filter; +import ch.qos.logback.core.spi.FilterReply; + +/** + * Custom Filter class bind with logback.xml configuration file to strip out + * certain log messages coming out of special packages or classes. + * + */ +public class CustomLoggingFilter extends Filter<ILoggingEvent> { + + /** + * Custom Filter is added to strip out the continuous U-EB logging messages + * But make sure we log the ERROR and WARNING Level messages. + * + * @param event + * Logging event + */ + @Override + public FilterReply decide(ILoggingEvent event) { + try { + if ((event.getLevel() != Level.ERROR || event.getLevel() != Level.WARN) + && (event.getThreadName().equalsIgnoreCase("UEBConsumerThread")) + && (event.getLoggerName().contains("com.att.nsa") + || event.getLoggerName().contains("org.apache.http"))) { + return FilterReply.DENY; + } else { + return FilterReply.NEUTRAL; + } + } catch (Exception e) { + return FilterReply.NEUTRAL; + } + } +} |