public static void openLogFile(String logPath){
  if (logPath == null) {
    printStream=System.out;
  }
 else {
    try {
      printStream=new PrintStream(new File(logPath));
    }
 catch (    FileNotFoundException e) {
      throw new IllegalArgumentException("Log file " + logPath + " was not found",e);
    }
  }
}

public static void openLogFile ( String logPath ) { if ( logPath == null ) { printStream = System . out ; } else { try { printStream = new PrintStream ( new File ( logPath ) ) ; } catch ( FileNotFoundException e ) { throw new IllegalArgumentException ( "Log file " + logPath + " was not found" , e ) ; } } }
reopen the associated static logging stream . set to null to redirect to system . out .
