提交 383bad13 authored 作者: Thomas Mueller's avatar Thomas Mueller

The H2 Console now prints a status message if started with parameters.

上级 5562f5a9
...@@ -449,7 +449,7 @@ public class WebServer implements Service { ...@@ -449,7 +449,7 @@ public class WebServer implements Service {
} }
public String getType() { public String getType() {
return "Web"; return "Web Console";
} }
public String getName() { public String getName() {
......
...@@ -101,6 +101,7 @@ ShutdownHandler { ...@@ -101,6 +101,7 @@ ShutdownHandler {
boolean tcpStart = false, pgStart = false, webStart = false, toolStart = false; boolean tcpStart = false, pgStart = false, webStart = false, toolStart = false;
boolean browserStart = false; boolean browserStart = false;
boolean startDefaultServers = true; boolean startDefaultServers = true;
boolean printStatus = args != null && args.length > 0;
for (int i = 0; args != null && i < args.length; i++) { for (int i = 0; args != null && i < args.length; i++) {
String arg = args[i]; String arg = args[i];
...@@ -142,6 +143,9 @@ ShutdownHandler { ...@@ -142,6 +143,9 @@ ShutdownHandler {
web = Server.createWebServer(args); web = Server.createWebServer(args);
web.setShutdownHandler(this); web.setShutdownHandler(this);
web.start(); web.start();
if (printStatus) {
out.println(web.getStatus());
}
webRunning = true; webRunning = true;
} catch (SQLException e) { } catch (SQLException e) {
printProblem(e, web); printProblem(e, web);
...@@ -173,6 +177,9 @@ ShutdownHandler { ...@@ -173,6 +177,9 @@ ShutdownHandler {
try { try {
tcp = Server.createTcpServer(args); tcp = Server.createTcpServer(args);
tcp.start(); tcp.start();
if (printStatus) {
out.println(tcp.getStatus());
}
} catch (SQLException e) { } catch (SQLException e) {
printProblem(e, tcp); printProblem(e, tcp);
if (startException == null) { if (startException == null) {
...@@ -184,6 +191,9 @@ ShutdownHandler { ...@@ -184,6 +191,9 @@ ShutdownHandler {
try { try {
pg = Server.createPgServer(args); pg = Server.createPgServer(args);
pg.start(); pg.start();
if (printStatus) {
out.println(pg.getStatus());
}
} catch (SQLException e) { } catch (SQLException e) {
printProblem(e, pg); printProblem(e, pg);
if (startException == null) { if (startException == null) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论