|
|
@@ -2,6 +2,7 @@ package org.jetlinks.community.logging.access;
|
|
|
|
|
|
import org.hswebframework.web.logging.events.AccessLoggerAfterEvent;
|
|
|
import org.jetlinks.community.logging.configuration.LoggingProperties;
|
|
|
+import org.jetlinks.core.utils.TopicUtils;
|
|
|
import org.springframework.context.ApplicationEventPublisher;
|
|
|
import org.springframework.context.event.EventListener;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
@@ -20,6 +21,11 @@ public class AccessLoggingTranslator {
|
|
|
|
|
|
@EventListener
|
|
|
public void translate(AccessLoggerAfterEvent event) {
|
|
|
+ for (String pathExclude : properties.getAccess().getPathExcludes()) {
|
|
|
+ if (TopicUtils.match(pathExclude, event.getLogger().getUrl())) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
eventPublisher.publishEvent(SerializableAccessLog.of(event.getLogger()));
|
|
|
}
|
|
|
|