aboutsummaryrefslogtreecommitdiffstats
path: root/zookeeper-command-line-client/src/main/java/com/yahoo/vespa/zookeeper/cli/Main.java
blob: 9627a4bb9da83fbaaf5364656859d8763ed63b2f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.zookeeper.cli;

import com.yahoo.vespa.zookeeper.client.ZkClientConfigBuilder;
import org.apache.zookeeper.ZooKeeperMain;
import org.apache.zookeeper.util.ServiceUtils;
import org.slf4j.impl.SimpleLogger;
import java.io.IOException;

/**
 * @author bjorncs
 */
public class Main {

    static {
        System.setProperty(SimpleLogger.DEFAULT_LOG_LEVEL_KEY, "WARN");
    }

    public static void main(String[] args) throws IOException, InterruptedException {
        new ZkClientConfigBuilder()
                .toConfigProperties()
                .forEach(System::setProperty);
        ServiceUtils.setSystemExitProcedure(System::exit);
        ZooKeeperMain.main(args);
    }
}