Sha256: deb38a8ba5c0ac68459bc21cb4e4633d9b59e87ae1f17e343e95a7222c6049fd
Contents?: true
Size: 957 Bytes
Versions: 4
Compression:
Stored size: 957 Bytes
Contents
package org.embulk.executor.remoteserver; import ch.qos.logback.classic.Level; import ch.qos.logback.classic.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.Map; public class Launcher { public static void main(String[] args) throws IOException { Map<String, String> envVars = System.getenv(); String host = envVars.getOrDefault("BIND_ADDRESS", "0.0.0.0"); int port = Integer.parseInt(envVars.getOrDefault("PORT", "30001")); int numOfWorkers = Integer.parseInt(envVars.getOrDefault("NUM_OF_WORKERS", "1")); Level logLevel = Level.toLevel(envVars.getOrDefault("LOG_LEVEL", "info")); configureLogLevel(logLevel); EmbulkServer.start(host, port, numOfWorkers); } private static void configureLogLevel(Level logLevel) { Logger rootLogger = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME); rootLogger.setLevel(logLevel); } }
Version data entries
4 entries across 4 versions & 1 rubygems