java 获取全部日志日志
public static String getExceptionAllInfo(Exception ex) { ByteArrayOutputStream out = null; PrintStream pout = null; String ret = ""; try { out = new ByteArrayOutputStream(); pout = new PrintStream(out); ex.printStackTrace(pout); ret = new String(out.toByteArray()); out.close(); }catch(Exception e){ return ex.getMessage(); }finally{ if(pout!=null){ pout.close(); } } return ret; }