/** * make sure that we always use the right LogChute Object */ protected LogChute getLogChute() { return log.getLogChute(); }
/** * make sure that we always use the right LogChute Object */ protected LogChute getLogChute() { return log.getLogChute(); }
/** * Create a new LogDisplayWrapper * @param log The Log object to wrap. * @param prefix The prefix to record with all messages. * @param outputMessages True when messages should actually get logged. */ public LogDisplayWrapper(final Log log, final String prefix, final boolean outputMessages) { super(log.getLogChute()); this.log = log; this.prefix = prefix; this.outputMessages = outputMessages; }
/** * Create a new LogDisplayWrapper * @param log The Log object to wrap. * @param prefix The prefix to record with all messages. * @param outputMessages True when messages should actually get logged. */ public LogDisplayWrapper(final Log log, final String prefix, final boolean outputMessages) { super(log.getLogChute()); this.log = log; this.prefix = prefix; this.outputMessages = outputMessages; }
/** * Returns true if error level messages will be printed by the LogChute. * @return True if error level messages will be printed by the LogChute. */ public boolean isErrorEnabled() { return getLogChute().isLevelEnabled(LogChute.ERROR_ID); }
/** * Returns true if debug level messages will be printed by the LogChute. * @return True if debug level messages will be printed by the LogChute. */ public boolean isDebugEnabled() { return getLogChute().isLevelEnabled(LogChute.DEBUG_ID); }
/** * Returns true if error level messages will be printed by the LogChute. * @return True if error level messages will be printed by the LogChute. */ public boolean isErrorEnabled() { return getLogChute().isLevelEnabled(LogChute.ERROR_ID); }
/** * Returns true if info level messages will be printed by the LogChute. * @return True if info level messages will be printed by the LogChute. */ public boolean isInfoEnabled() { return getLogChute().isLevelEnabled(LogChute.INFO_ID); }
protected void log(int level, Object message, Throwable t) { getLogChute().log(level, String.valueOf(message), t); }
protected void log(int level, Object message) { getLogChute().log(level, String.valueOf(message)); }
/** * Returns true if warn level messages will be printed by the LogChute. * @return True if warn level messages will be printed by the LogChute. */ public boolean isWarnEnabled() { return getLogChute().isLevelEnabled(LogChute.WARN_ID); }
/** * Returns true if debug level messages will be printed by the LogChute. * @return True if debug level messages will be printed by the LogChute. */ public boolean isDebugEnabled() { return getLogChute().isLevelEnabled(LogChute.DEBUG_ID); }
/** * Returns true if warn level messages will be printed by the LogChute. * @return True if warn level messages will be printed by the LogChute. */ public boolean isWarnEnabled() { return getLogChute().isLevelEnabled(LogChute.WARN_ID); }
/** * Returns true if trace level messages will be printed by the LogChute. * @return If trace level messages will be printed by the LogChute. */ public boolean isTraceEnabled() { return getLogChute().isLevelEnabled(LogChute.TRACE_ID); }
/** * Returns true if info level messages will be printed by the LogChute. * @return True if info level messages will be printed by the LogChute. */ public boolean isInfoEnabled() { return getLogChute().isLevelEnabled(LogChute.INFO_ID); }
/** * Returns true if trace level messages will be printed by the LogChute. * @return If trace level messages will be printed by the LogChute. */ public boolean isTraceEnabled() { return getLogChute().isLevelEnabled(LogChute.TRACE_ID); }
protected void log(int level, Object message) { getLogChute().log(level, String.valueOf(message)); }
protected void log(int level, Object message, Throwable t) { getLogChute().log(level, String.valueOf(message), t); }
/** * Update the Log instance with the appropriate LogChute and other * settings determined by the RuntimeServices. * @param log * @param rsvc * @throws Exception * @since 1.5 */ public static void updateLog(Log log, RuntimeServices rsvc) throws Exception { // create a new LogChute using the RuntimeServices LogChute newLogChute = createLogChute(rsvc); LogChute oldLogChute = log.getLogChute(); // pass the new LogChute to the log first, // (if the old was a HoldingLogChute, we don't want it // to accrue new messages during the transfer below) log.setLogChute(newLogChute); // If the old LogChute was the pre-Init logger, // dump its messages into the new system. if (oldLogChute instanceof HoldingLogChute) { HoldingLogChute hlc = (HoldingLogChute)oldLogChute; hlc.transferTo(newLogChute); } }
/** * Update the Log instance with the appropriate LogChute and other * settings determined by the RuntimeServices. * @param log * @param rsvc * @throws Exception * @since 1.5 */ public static void updateLog(Log log, RuntimeServices rsvc) throws Exception { // create a new LogChute using the RuntimeServices LogChute newLogChute = createLogChute(rsvc); LogChute oldLogChute = log.getLogChute(); // pass the new LogChute to the log first, // (if the old was a HoldingLogChute, we don't want it // to accrue new messages during the transfer below) log.setLogChute(newLogChute); // If the old LogChute was the pre-Init logger, // dump its messages into the new system. if (oldLogChute instanceof HoldingLogChute) { HoldingLogChute hlc = (HoldingLogChute)oldLogChute; hlc.transferTo(newLogChute); } }