Search in sources :

Example 1 with ManifestVersion

use of com.netflix.exhibitor.core.state.ManifestVersion in project exhibitor by soabase.

the class ExhibitorCLI method logHelp.

public void logHelp(String prefix) {
    ManifestVersion manifestVersion = new ManifestVersion();
    log.info("Exhibitor properties (version: " + manifestVersion.getVersion() + ")");
    logOptions(null, prefix, generalOptions);
    for (OptionSection section : sections) {
        logOptions(section.sectionName, prefix, section.options);
    }
}
Also used : ManifestVersion(com.netflix.exhibitor.core.state.ManifestVersion)

Example 2 with ManifestVersion

use of com.netflix.exhibitor.core.state.ManifestVersion in project exhibitor by soabase.

the class ExhibitorCLI method printHelp.

public void printHelp() {
    ManifestVersion manifestVersion = new ManifestVersion();
    System.out.println("Exhibitor " + manifestVersion.getVersion());
    HelpFormatter formatter = new HelpFormatter() {

        @Override
        public void printUsage(PrintWriter pw, int width, String cmdLineSyntax) {
        }

        @Override
        public void printUsage(PrintWriter pw, int width, String app, Options options) {
        }
    };
    formatter.printHelp("ExhibitorMain", generalOptions);
    for (OptionSection section : sections) {
        formatter.printHelp(" ", "\n== " + section.sectionName + " ==", section.options, null);
    }
    System.out.println();
    System.out.println("== Default Property Names ==");
    for (StringConfigs config : StringConfigs.values()) {
        System.out.println("\t" + PropertyBasedInstanceConfig.toName(config, ""));
    }
    for (IntConfigs config : IntConfigs.values()) {
        System.out.println("\t" + PropertyBasedInstanceConfig.toName(config, ""));
    }
}
Also used : HelpFormatter(org.apache.commons.cli.HelpFormatter) Options(org.apache.commons.cli.Options) ManifestVersion(com.netflix.exhibitor.core.state.ManifestVersion) IntConfigs(com.netflix.exhibitor.core.config.IntConfigs) StringConfigs(com.netflix.exhibitor.core.config.StringConfigs) PrintWriter(java.io.PrintWriter)

Aggregations

ManifestVersion (com.netflix.exhibitor.core.state.ManifestVersion)2 IntConfigs (com.netflix.exhibitor.core.config.IntConfigs)1 StringConfigs (com.netflix.exhibitor.core.config.StringConfigs)1 PrintWriter (java.io.PrintWriter)1 HelpFormatter (org.apache.commons.cli.HelpFormatter)1 Options (org.apache.commons.cli.Options)1