- 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);
+ }