List of utility methods to do Log Exception
void | logError(Exception e) log Error logError(e, "");
|
String | logError(String s, Throwable e) log Error String msg = s + (e == null ? "" : ": " + e.toString()); echoln(msg); if (e != null) { if (verbose) e.printStackTrace(System.out); if (logOut != null) { e.printStackTrace(logOut); logOut.flush(); ... |
void | logException(Exception e, Logger logger) log Exception StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); pw.close(); logger.error(sw.toString()); |
void | LogException(Exception ex) Log Exception PrintWriter out = null; try { out = new PrintWriter(new BufferedWriter(new FileWriter("log.txt", true))); ex.printStackTrace(out); } catch (IOException e) { } finally { if (out != null) { out.close(); ... |
void | logException(final Throwable exception) log Exception exception.printStackTrace(writer); |
void | logException(int type, String RID, String subRID, String propIndication, String error) log Exception FileWriter f = getFileWriter(type); try { f.write("- [ ] [" + subRID + "](" + getUri(type, RID, subRID) + ") "); f.write("on property `" + propIndication + "`: " + error + "\n"); } catch (IOException e) { e.printStackTrace(); |
void | logException(Logger logger, Level logLevel, Exception e) Logs an exception with the given logger and the given level. if (logger.isLoggable(logLevel))
logger.log(logLevel, writeException(e));
|
void | logException(Logger logger, String message, Throwable t) log Exception logger.warning(message); logger.warning(excpToString(t)); |
void | logException(Logger logger, Throwable t) log Exception StringWriter sw = new StringWriter(); t.printStackTrace(new PrintWriter(sw)); logger.info(sw.toString()); |
void | LogException(String description, Throwable e) Log Exception File file = new File(getLogPath()); FileWriter writer = null; BufferedWriter bufferedWriter = null; try { writer = new FileWriter(file); bufferedWriter = new BufferedWriter(writer); bufferedWriter.flush(); bufferedWriter.newLine(); ... |