X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fjinetd%2FMain.java;h=40c15b5bb3629175e38e168dc11be020c1db826d;hb=HEAD;hp=a93972085bae8f4c0a72c2e6a7e4f322a59e890f;hpb=f6a248dc8bc0d44eabb0ca0b7b579de8fd8a32c2;p=org.ibex.jinetd.git diff --git a/src/org/ibex/jinetd/Main.java b/src/org/ibex/jinetd/Main.java index a939720..40c15b5 100644 --- a/src/org/ibex/jinetd/Main.java +++ b/src/org/ibex/jinetd/Main.java @@ -18,12 +18,13 @@ public class Main { System.setProperty("ibex.log.stackTraces", "true"); System.setProperty("ibex.log.notes.on", "false"); System.setProperty("org.mortbay.xml.XmlParser.NotValidating", "true"); + System.setProperty("org.mortbay.util.FileResource.checkAliases", "false"); System.setProperty("STOP.PORT", "0"); } public static String ROOT; - public static String LOGFILE; - public static PrintStream LOGSTREAM; + private static String LOGFILE; + private static PrintStream LOGSTREAM; public static String defaultDomain; public static void init() { @@ -38,12 +39,14 @@ public class Main { defaultDomain = localMachine.getHostName(); } catch(java.net.UnknownHostException uhe) { defaultDomain = "localhost"; } System.err.println(" jinetd.hostname = " + defaultDomain); - LOGFILE = System.getProperty("jinetd.logfile", ROOT + File.separatorChar+"log.txt"); - System.err.println(" jinetd.logfile = " + LOGFILE); - System.err.println(" redirecting stdout/stderr to logfile." + LOGFILE); - LOGSTREAM = new PrintStream(new FileOutputStream(LOGFILE, true)); - System.setErr(LOGSTREAM); - System.setOut(LOGSTREAM); + LOGFILE = System.getProperty("jinetd.logfile", /*ROOT + File.separatorChar+"log.txt"*/null); + if (LOGFILE != null) { + System.err.println(" jinetd.logfile = " + LOGFILE); + System.err.println(" redirecting stdout/stderr to logfile." + LOGFILE); + LOGSTREAM = new PrintStream(new FileOutputStream(LOGFILE, true)); + System.setErr(LOGSTREAM); + System.setOut(LOGSTREAM); + } gatherDependencies(); } catch (Throwable e) {