From b1bbb58449af091cf20f296ba19130b446d68022 Mon Sep 17 00:00:00 2001 From: Bjørn Christian Seime Date: Thu, 21 Jan 2021 13:28:18 +0100 Subject: Replace AccessLogEntry with non-blocking RequestLogEntry Keep AccessLogEntry as interface for adding extra information in handlers, but use the new RequestLogEntry for access log serialization. Introduce new interface RequestLog that AccessLog class implements (to simplify unit testing). Rename AccessLogInterface to RequestLogHandler. Remove unused class AccessLogSampler. --- .../java/com/yahoo/processing/handler/ProcessingTestDriver.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'container-core/src/main/java/com/yahoo/processing/handler') diff --git a/container-core/src/main/java/com/yahoo/processing/handler/ProcessingTestDriver.java b/container-core/src/main/java/com/yahoo/processing/handler/ProcessingTestDriver.java index d4e55dbc556..7170f63234e 100644 --- a/container-core/src/main/java/com/yahoo/processing/handler/ProcessingTestDriver.java +++ b/container-core/src/main/java/com/yahoo/processing/handler/ProcessingTestDriver.java @@ -7,7 +7,7 @@ import com.yahoo.component.chain.Chain; import com.yahoo.component.provider.ComponentRegistry; import com.yahoo.container.jdisc.RequestHandlerTestDriver; import com.yahoo.container.logging.AccessLog; -import com.yahoo.container.logging.AccessLogInterface; +import com.yahoo.container.logging.RequestLogHandler; import com.yahoo.processing.Processor; import com.yahoo.processing.execution.chain.ChainRegistry; import com.yahoo.processing.rendering.Renderer; @@ -60,15 +60,15 @@ public class ProcessingTestDriver extends RequestHandlerTestDriver { this.processingHandler = processingHandler; } - public ProcessingTestDriver(Chain chain, AccessLogInterface accessLogInterface) { + public ProcessingTestDriver(Chain chain, RequestLogHandler accessLogInterface) { this(createProcessingHandler( Collections.singleton(chain), new ComponentRegistry<>(), createAccessLog(accessLogInterface))); } - private static AccessLog createAccessLog(AccessLogInterface accessLogInterface) { - ComponentRegistry componentRegistry = new ComponentRegistry<>(); + private static AccessLog createAccessLog(RequestLogHandler accessLogInterface) { + ComponentRegistry componentRegistry = new ComponentRegistry<>(); componentRegistry.register(ComponentId.createAnonymousComponentId("access-log"), accessLogInterface); componentRegistry.freeze(); -- cgit v1.2.3