use of com.thoughtworks.go.logging.LogConfigurator in project gocd by gocd.
the class DevelopmentServer method main.
public static void main(String[] args) throws Exception {
LogConfigurator logConfigurator = new LogConfigurator(DEFAULT_LOGBACK_CONFIGURATION_FILE);
logConfigurator.initialize();
copyDbFiles();
copyPluginAssets();
File webApp = new File("webapp");
if (!webApp.exists()) {
throw new RuntimeException("No webapp found in " + webApp.getAbsolutePath());
}
assertActivationJarPresent();
SystemEnvironment systemEnvironment = new SystemEnvironment();
systemEnvironment.setProperty(GENERATE_STATISTICS, "true");
systemEnvironment.setProperty(SystemEnvironment.PARENT_LOADER_PRIORITY, "true");
systemEnvironment.setProperty(SystemEnvironment.CRUISE_SERVER_WAR_PROPERTY, webApp.getAbsolutePath());
systemEnvironment.set(SystemEnvironment.PLUGIN_LOCATION_MONITOR_INTERVAL_IN_SECONDS, 5);
systemEnvironment.set(SystemEnvironment.DEFAULT_PLUGINS_ZIP, "/plugins.zip");
systemEnvironment.set(SystemEnvironment.PLUGIN_ACTIVATOR_JAR_PATH, "go-plugin-activator.jar");
// 0 means reload when stale
systemEnvironment.setProperty(GoConstants.I18N_CACHE_LIFE, "0");
systemEnvironment.set(SystemEnvironment.GO_SERVER_MODE, "development");
setupPeriodicGC(systemEnvironment);
assertPluginsZipExists();
GoServer server = new GoServer();
systemEnvironment.setProperty(GoConstants.USE_COMPRESSED_JAVASCRIPT, Boolean.toString(false));
try {
server.startServer();
String hostName = systemEnvironment.getListenHost();
if (hostName == null) {
hostName = "localhost";
}
System.out.println("Go server dashboard started on http://" + hostName + ":" + systemEnvironment.getServerPort());
System.out.println("* credentials: \"admin\" / \"badger\"");
} catch (Exception e) {
System.err.println("Failed to start Go server. Exception:");
e.printStackTrace();
}
}
use of com.thoughtworks.go.logging.LogConfigurator in project gocd by gocd.
the class AgentMain method main.
public static void main(String... argv) throws Exception {
assertVMVersion();
AgentBootstrapperArgs args = new AgentCLI().parse(argv);
LogConfigurator logConfigurator = new LogConfigurator(DEFAULT_LOGBACK_CONFIGURATION_FILE);
logConfigurator.initialize();
new SystemEnvironment().setProperty("go.process.type", "agent");
new SystemEnvironment().setProperty(SystemEnvironment.SERVICE_URL, args.getServerUrl().toString());
new SystemEnvironment().setProperty(SystemEnvironment.AGENT_SSL_VERIFICATION_MODE, args.getSslMode().toString());
if (args.getRootCertFile() != null) {
new SystemEnvironment().setProperty(SystemEnvironment.AGENT_ROOT_CERT_FILE, args.getRootCertFile().toString());
}
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
ctx.registerShutdownHook();
}
use of com.thoughtworks.go.logging.LogConfigurator in project gocd by gocd.
the class AgentBootstrapper method main.
public static void main(String[] argv) {
assertVMVersion();
AgentBootstrapperArgs args = new AgentCLI().parse(argv);
new LogConfigurator(DEFAULT_LOGBACK_CONFIGURATION_FILE).runWithLogger(() -> new AgentBootstrapper().go(true, args));
}
use of com.thoughtworks.go.logging.LogConfigurator in project gocd by gocd.
the class AgentMacWindow method main.
public static void main(String[] args) throws IOException {
LogConfigurator logConfigurator = new LogConfigurator(DEFAULT_LOGBACK_CONFIGURATION_FILE);
logConfigurator.initialize();
new AgentMacWindow().go();
}
use of com.thoughtworks.go.logging.LogConfigurator in project gocd by gocd.
the class GoLauncher method main.
public static void main(String[] args) throws Exception {
assertVMVersion();
SystemEnvironment systemEnvironment = new SystemEnvironment();
systemEnvironment.setProperty(GoConstants.USE_COMPRESSED_JAVASCRIPT, Boolean.toString(true));
LogConfigurator logConfigurator = new LogConfigurator(DEFAULT_LOGBACK_CONFIGURATION_FILE);
logConfigurator.initialize();
try {
cleanupTempFiles();
new GoServer().go();
} catch (Exception e) {
System.err.println("ERROR: Failed to start Go server. Please check the logs.");
e.printStackTrace();
System.exit(1);
}
}
Aggregations