public void debug(Object message) { if (message instanceof String || this.logger.isDebugEnabled()) { this.logger.debug(String.valueOf(message)); } }
public void warn(Object message) { if (message instanceof String || this.logger.isWarnEnabled()) { this.logger.warn(String.valueOf(message)); } }
public void error(Object message, Throwable exception) { if (message instanceof String || this.logger.isErrorEnabled()) { this.logger.error(String.valueOf(message), exception); } }
@Override public void warn(String msg) { logger.warn(msg); }
@Override public void debug(Throwable e) { if (locationAwareLogger != null) { locationAwareLogger.log(null, FQCN, LocationAwareLogger.DEBUG_INT, e.getMessage(), null, e); return; } logger.debug(e.getMessage(), e); }
private boolean threadShouldExit(long now, long curHardShutdownTimeMs) { if (!hasActiveExternalCalls()) { log.trace("All work has been completed, and the I/O thread is now exiting."); return true; } if (now >= curHardShutdownTimeMs) { log.info("Forcing a hard I/O thread shutdown. Requests in progress will be aborted."); return true; } log.debug("Hard shutdown in {} ms.", curHardShutdownTimeMs - now); return false; }
private static void artificialDelayOf(long millis) { try { Thread.sleep(millis); } catch (InterruptedException e) { LOGGER.error("sleep interrupted", e); } }
public static void setClipboardString(String text) { try { Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); Transferable transferable = new StringSelection(text); clipboard.setContents(transferable, null); LOG.debug("String '{}' copied to clipboard", text); } catch (Exception e) { LOG.error("Failed copy string '{}' to clipboard", text, e); } } }
@Override public void trace(String msg) { logger.trace(msg); }
@Override public boolean isDebugEnabled() { return logger.isDebugEnabled(); }
public void trace(Object message) { if (message instanceof String || this.logger.isTraceEnabled()) { this.logger.trace(String.valueOf(message)); } }
@Override public void warn(String format, Object arg) { logger.warn(format, arg); }
@Override public void debug(String msg) { if (locationAwareLogger != null) { locationAwareLogger.log(null, FQCN, LocationAwareLogger.DEBUG_INT, msg, null, null); return; } logger.debug(msg); }
private static long ap(long i) { try { Thread.sleep(i); } catch (InterruptedException e) { LOGGER.error("Exception caught.", e); } return i * (i + 1) / 2; } }
public void error(Object message) { if (message instanceof String || this.logger.isErrorEnabled()) { this.logger.error(String.valueOf(message)); } }
public void warn(Object message, Throwable exception) { if (message instanceof String || this.logger.isWarnEnabled()) { this.logger.warn(String.valueOf(message), exception); } }
@Override public void trace(String format, Object... argArray) { logger.trace(format, argArray); }