private static URL chooseConfigurationResource(final Optional<String> logPath) {
        if (logPath.orElse("-").equals("-")) {
            if (System.console() != null) {
                return CliLogbackConfigurator.class.getResource("/embulk/logback-color.xml");
            } else {
                return CliLogbackConfigurator.class.getResource("/embulk/logback-console.xml");
            }
        }

        // logback uses system property to embed variables in XML file
        System.setProperty("embulk.logPath", logPath.get());
        return CliLogbackConfigurator.class.getResource("/embulk/logback-file.xml");
    }
Configures Logback's root logger.

<p>It calls Logback's configurators through reflection so that embulk-core does not need to depend on Logback's classes.
embulk-core/src/main/java/org/embulk/cli/CliLogbackConfigurator.java