diff --git a/vpro-shared-rs/src/main/java/nl/vpro/rs/interceptors/AccessLogInterceptor.java b/vpro-shared-rs/src/main/java/nl/vpro/rs/interceptors/AccessLogInterceptor.java index 52bee73c9..ee2454d01 100644 --- a/vpro-shared-rs/src/main/java/nl/vpro/rs/interceptors/AccessLogInterceptor.java +++ b/vpro-shared-rs/src/main/java/nl/vpro/rs/interceptors/AccessLogInterceptor.java @@ -3,8 +3,7 @@ import lombok.extern.slf4j.Slf4j; import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; +import java.nio.file.*; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong; @@ -19,6 +18,7 @@ import org.springframework.jmx.export.annotation.ManagedResource; import org.springframework.stereotype.Component; +import nl.vpro.jmx.MBeans; import nl.vpro.logging.mdc.MDCConstants; import nl.vpro.logging.simple.Slf4jSimpleLogger; import nl.vpro.util.*; @@ -99,4 +99,18 @@ public int getTruncateAfter() { public void setTruncateAfter(int truncateAfter) { this.truncateAfter = truncateAfter; } + + @ManagedAttribute + public String getFilesPath() { + return filesPath == null ? null : filesPath.toString(); + } + + @ManagedAttribute + public void setFilesPath(String string) { + if (MBeans.isBlank(string)) { + filesPath = null; + } else { + filesPath = Paths.get(string); + } + } }