diff options
-rw-r--r-- | rulemgt-standalone/src/main/assembly/conf/rulemgt.yml | 27 | ||||
-rw-r--r-- | rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java | 5 |
2 files changed, 19 insertions, 13 deletions
diff --git a/rulemgt-standalone/src/main/assembly/conf/rulemgt.yml b/rulemgt-standalone/src/main/assembly/conf/rulemgt.yml index b0a934b..adf9c76 100644 --- a/rulemgt-standalone/src/main/assembly/conf/rulemgt.yml +++ b/rulemgt-standalone/src/main/assembly/conf/rulemgt.yml @@ -24,30 +24,31 @@ server: logging: # The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL. - level: INFO + level: ALL # Logger-specific levels. loggers: # Sets the level for 'com.example.app' to DEBUG. - com.example: DEBUG + org.onap.holmes.rulemgt: ALL appenders: - type: console - threshold: INFO + threshold: ALL timeZone: UTC - logFormat: "%d{yyyy-MM-dd HH:mm:ss SSS} %-5p [%c][%t] - %m%n" + logFormat: "%nopexception%logger\n|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}\n|%level\n|%message\n|[%mdc]\n|%rootException\n|%marker\n|%thread\n|%n \r\n" - type: file - threshold: INFO - logFormat: "%d{yyyy-MM-dd HH:mm:ss SSS} %-5p [%c][%t] - %m%n" - currentLogFilename: ../logs/fm-relation.log - archivedLogFilenamePattern: ../logs/zip/fm-relation-%d{yyyy-MM-dd}.log.gz + threshold: ERROR + logFormat: "%nopexception%logger\n|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}\n|%level\n|%message\n|%X{InvocationID}\n|%rootException\n|%marker\n|%thread\n|%n \r\n" + currentLogFilename: /var/log/ONAP/holmes/rulemgt-relation-error.log + archivedLogFilenamePattern: /var/log/ONAP/holmes/zip/rulemgt-relation-error-%d{yyyy-MM-dd}.log.gz + archivedFileCount: 7 + - type: file + threshold: DEBUG + logFormat: "%nopexception%logger\n|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}\n|%level\n|%message\n|%X{InvocationID}\n|%rootException\n|%marker\n|%thread\n|%n \r\n" + currentLogFilename: /var/log/ONAP/holmes/rulemgt-relation-debug.log + archivedLogFilenamePattern: /var/log/ONAP/holmes/zip/rulemgt-relation-debug-%d{yyyy-MM-dd}.log.gz archivedFileCount: 7 - # - type: socketJson - threshold: INFO - # autoDiscover: false - # logstashServiceName: logstash - # logstashServiceVersion: v1 #database database: diff --git a/rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java b/rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java index e7f30a7..5f96912 100644 --- a/rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java +++ b/rulemgt/src/main/java/org/onap/holmes/rulemgt/RuleActiveApp.java @@ -17,16 +17,19 @@ package org.onap.holmes.rulemgt; import io.dropwizard.setup.Environment; +import java.util.EnumSet; import java.util.HashSet; import java.util.Set; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; +import javax.servlet.DispatcherType; import lombok.extern.slf4j.Slf4j; import org.onap.holmes.common.config.MicroServiceConfig; import org.onap.holmes.common.dropwizard.ioc.bundle.IOCApplication; import org.onap.holmes.common.exception.CorrelationException; import org.onap.holmes.common.utils.MSBRegisterUtil; +import org.onap.holmes.common.utils.transactionid.TransactionIdFilter; import org.onap.holmes.rulemgt.dcae.DcaeConfigurationPolling; import org.onap.holmes.rulemgt.resources.RuleMgtResources; import org.onap.msb.sdk.discovery.entity.MicroServiceInfo; @@ -59,6 +62,8 @@ public class RuleActiveApp extends IOCApplication<RuleAppConfig> { service.scheduleAtFixedRate( new DcaeConfigurationPolling(MicroServiceConfig.getEnv(MicroServiceConfig.HOSTNAME)), 0, DcaeConfigurationPolling.POLLING_PERIOD, TimeUnit.MILLISECONDS); + environment.servlets().addFilter("customFilter",new TransactionIdFilter()).addMappingForUrlPatterns(EnumSet + .allOf(DispatcherType.class),true,"/*"); } private MicroServiceInfo createMicroServiceInfo() { |