use of com.yahoo.vespa.model.container.component.AccessLogComponent.AccessLogType in project vespa by vespa-engine.
the class AccessLogBuilder method buildIfNotDisabled.
public static Optional<AccessLogComponent> buildIfNotDisabled(ContainerCluster cluster, Element accessLogSpec) {
AccessLogTypeLiteral typeLiteral = getOptionalAttribute(accessLogSpec, "type").map(AccessLogTypeLiteral::fromAttributeValue).orElse(AccessLogTypeLiteral.VESPA);
AccessLogType logType = logTypeFor(typeLiteral);
if (logType == null) {
return Optional.empty();
}
DeployState deployState = cluster.getDeployState();
return Optional.of(new DomBuilder(logType, deployState).build(cluster, accessLogSpec));
}
Aggregations