static public PrintWriter log(Throwable xcpt,PrintWriter out){
  out.println("-----------");
  out.println(xcpt.toString());
  out.println("Stack Trace:");
  out.print(getStackTrace(xcpt));
  out.println("-----------");
  out.flush();
  return out;
}

static public PrintWriter log ( Throwable xcpt , PrintWriter out ) { out . println ( "-----------" ) ; out . println ( xcpt . toString ( ) ) ; out . println ( "Stack Trace:" ) ; out . print ( getStackTrace ( xcpt ) ) ; out . println ( "-----------" ) ; out . flush ( ) ; return out ; }
a utility method to format an exception to a printwriter .
