Search in sources :

Example 1 with AccessLogType

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));
}
Also used : VespaDomBuilder(com.yahoo.vespa.model.builder.xml.dom.VespaDomBuilder) AccessLogType(com.yahoo.vespa.model.container.component.AccessLogComponent.AccessLogType) DeployState(com.yahoo.config.model.deploy.DeployState)

Aggregations

DeployState (com.yahoo.config.model.deploy.DeployState)1 VespaDomBuilder (com.yahoo.vespa.model.builder.xml.dom.VespaDomBuilder)1 AccessLogType (com.yahoo.vespa.model.container.component.AccessLogComponent.AccessLogType)1