@Override public void log(LEVEL level, Object ... msg) { for (Log target : targets) target.log(level, msg); }
/** * Log a message in trace, it will automatically append the objects if trace is enabled. Can Also add a trace. * This is the local trace method. The trace will only written if the local trace is switched on. * @param msg */ public void t(Object ... msg) { log(LEVEL.TRACE, msg); }
/** * Log a message in debug, it will automatically append the objects if debug is enabled. Can Also add a trace. * @param msg */ public void d(Object ... msg) { log(LEVEL.DEBUG, msg); }
/** * Log a message in error, it will automatically append the objects if debug is enabled. Can Also add a trace. * @param msg */ public void e(Object ... msg) { log(LEVEL.ERROR, msg); }
/** * Log a message in info, it will automatically append the objects if debug is enabled. Can Also add a trace. * @param msg */ public void f(Object ... msg) { log(LEVEL.FATAL, msg); }
/** * Log a message in info, it will automatically append the objects if debug is enabled. Can Also add a trace. * @param msg */ public void i(Object ... msg) { log(LEVEL.INFO, msg); }
/** * Log a message in warn, it will automatically append the objects if debug is enabled. Can Also add a trace. * @param msg */ public void w(Object ... msg) { log(LEVEL.WARN, msg); }
/** {@inheritDoc} */ @Override public void log(LEVEL level, Object ... msg) { for (Log target : targets) target.log(level, msg); }
protected void writeLine() { log.log(level, line); line.setLength(0); }
@Override protected void writeLine() { if (enter.get() != null) return; enter.set(true); try { log.log(level, line); line.setLength(0); } finally { enter.remove(); } }