APISonar


org.glassfish.contextpropagation.bootstrap.LoggerAdapter.log

> org > glassfish > contextpropagation > bootstrap > LoggerAdapter > log
org APIs glassfish APIs contextpropagation APIs bootstrap APIs LoggerAdapter APIs log APIs

Example 1
private static void error(MessageID messageID, Object... args) {
    LoggerAdapter logger = ContextBootstrap.getLoggerAdapter(); 
    if (logger.isLoggable(Level.ERROR)) {
      logger.log(Level.ERROR, messageID, args);
    }
  }
Example 2
private final LoggerAdapter logger = ContextBootstrap.getLoggerAdapter();

  private <T> T extractResult(String key, Entry entry, String operation) {
    T result =  (T) (entry == null ? null : entry.value); 
    if (logger.isLoggable(Level.DEBUG)) {
      logger.log(Level.DEBUG, MessageID.OPERATION, operation, key, result);
    }
    return result;
  }