i redirect the stderr and stdout to the same file that the log4j is logging the information to using the following code.
String fileName = ((FileAppender) appender).getFile(); if (fileName != null) { PrintStream ps = new PrintStream (new FileOutputStream(new File(fileName), true)); System.setErr(ps); System.setOut(ps); } the problem with this is that when the log4j rollover the file, the stderr and stdout is still redirected to the old file not the new one. any other way to do this properly? -- View this message in context: http://www.nabble.com/stderr-and-stdout-rollover-tp24073744p24073744.html Sent from the Log4j - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org