diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java index f7fada3df27..c43d95c1b85 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java @@ -17,7 +17,9 @@ import java.io.File; import java.io.FileFilter; import java.io.FileInputStream; import java.io.FileNotFoundException; +import java.io.FileOutputStream; import java.io.FileReader; +import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; @@ -163,9 +165,11 @@ public class Main } // Special internal indicator that jetty was started by the jetty.sh Daemon - if ("--fromDaemon".equals(arg)) + if ("--daemon".equals(arg)) { - System.err.println("WARN: Ignored deprecated --fromDaemon"); + PrintStream logger = new PrintStream(new FileOutputStream(new File(System.getProperty("jetty.log","."),"start.log"))); + System.setOut(logger); + System.setErr(logger); continue; } diff --git a/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt b/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt index 11d76b07d4b..ae54ba7e43c 100644 --- a/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt +++ b/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt @@ -26,6 +26,9 @@ Command Line Options: --stop Stop the running Jetty instance. + --daemon Start in daemon mode with stderr and stdout + redirected to ${jetty.log}/start.log + --config= Specify an alternate start.config file. The default is the start.config file inside the start.jar. The default can also be specified