org.jclouds.logging.Logger.isTraceEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(9.7k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中org.jclouds.logging.Logger.isTraceEnabled()方法的一些代码示例,展示了Logger.isTraceEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isTraceEnabled()方法的具体详情如下:
包路径:org.jclouds.logging.Logger
类名称:Logger
方法名:isTraceEnabled

Logger.isTraceEnabled介绍

暂无

代码示例

代码示例来源:origin: jclouds/legacy-jclouds

protected NoSuchElementException throwNoSuchElementExceptionAfterLoggingHardwareIds(String message, Iterable<? extends Hardware> hardwares) {
 NoSuchElementException exception = new NoSuchElementException(message);
 if (logger.isTraceEnabled())
   logger.warn(exception, "hardware ids that didn't match: %s", transform(hardwares, hardwareToId));
 throw exception;
}

代码示例来源:origin: jclouds/legacy-jclouds

protected NoSuchElementException throwNoSuchElementExceptionAfterLoggingImageIds(String message, Iterable<? extends Image> images) {
 NoSuchElementException exception = new NoSuchElementException(message);
 if (logger.isTraceEnabled())
   logger.warn(exception, "image ids that didn't match: %s", transform(images, imageToId));
 throw exception;
}

代码示例来源:origin: org.apache.jclouds/jclouds-compute

protected NoSuchElementException throwNoSuchElementExceptionAfterLoggingImageIds(String message, Iterable<? extends Image> images) {
 NoSuchElementException exception = new NoSuchElementException(message);
 if (logger.isTraceEnabled())
   logger.warn(exception, "image ids that didn't match: %s", transform(images, imageToId));
 throw exception;
}

代码示例来源:origin: org.apache.jclouds/jclouds-compute

protected NoSuchElementException throwNoSuchElementExceptionAfterLoggingHardwareIds(String message, Iterable<? extends Hardware> hardwares) {
 NoSuchElementException exception = new NoSuchElementException(message);
 if (logger.isTraceEnabled())
   logger.warn(exception, "hardware ids that didn't match: %s", transform(hardwares, hardwareToId));
 throw exception;
}

代码示例来源:origin: io.cloudsoft.jclouds/jclouds-compute

protected NoSuchElementException throwNoSuchElementExceptionAfterLoggingImageIds(String message, Iterable<? extends Image> images) {
 NoSuchElementException exception = new NoSuchElementException(message);
 if (logger.isTraceEnabled())
   logger.warn(exception, "image ids that didn't match: %s", transform(images, imageToId));
 throw exception;
}

代码示例来源:origin: io.cloudsoft.jclouds/jclouds-compute

protected NoSuchElementException throwNoSuchElementExceptionAfterLoggingHardwareIds(String message, Iterable<? extends Hardware> hardwares) {
 NoSuchElementException exception = new NoSuchElementException(message);
 if (logger.isTraceEnabled())
   logger.warn(exception, "hardware ids that didn't match: %s", transform(hardwares, hardwareToId));
 throw exception;
}

代码示例来源:origin: apache/jclouds

protected NoSuchElementException throwNoSuchElementExceptionAfterLoggingImageIds(String message, Iterable<? extends Image> images) {
 NoSuchElementException exception = new NoSuchElementException(message);
 if (logger.isTraceEnabled())
   logger.warn(exception, "image ids that didn't match: %s", transform(images, imageToId));
 throw exception;
}

代码示例来源:origin: apache/jclouds

protected NoSuchElementException throwNoSuchElementExceptionAfterLoggingHardwareIds(String message, Iterable<? extends Hardware> hardwares) {
 NoSuchElementException exception = new NoSuchElementException(message);
 if (logger.isTraceEnabled())
   logger.warn(exception, "hardware ids that didn't match: %s", transform(hardwares, hardwareToId));
 throw exception;
}

代码示例来源:origin: org.apache.jclouds/jclouds-compute

@Override
  public Image apply(Iterable<? extends Image> input) {
   List<? extends Image> maxImages = multiMax(ordering, input);
   if (logger.isTraceEnabled())
     logger.trace("<<   best images(%s)", transform(maxImages, imageToId));
   return maxImages.get(maxImages.size() - 1);
  }
};

代码示例来源:origin: io.cloudsoft.jclouds/jclouds-compute

@Override
  public Image apply(Iterable<? extends Image> input) {
   List<? extends Image> maxImages = multiMax(ordering, input);
   if (logger.isTraceEnabled())
     logger.trace("<<   best images(%s)", transform(maxImages, imageToId));
   return maxImages.get(maxImages.size() - 1);
  }
};

代码示例来源:origin: apache/jclouds

@Override
  public Image apply(Iterable<? extends Image> input) {
   List<? extends Image> maxImages = multiMax(ordering, input);
   if (logger.isTraceEnabled())
     logger.trace("<<   best images(%s)", transform(maxImages, imageToId));
   return maxImages.get(maxImages.size() - 1);
  }
};

代码示例来源:origin: jclouds/legacy-jclouds

@Override
 public boolean apply(ReferenceType arg0) {
   // TODO: this is inefficient, calculating the index each time, but
   // shouldn't be added to constructor as the supplier is an expensive
   // call
   Map<URI, Catalog> index = catalogsByIdSupplier.get();
   Catalog catalog = index.get(arg0.getHref());
   if (catalog == null) {
    if (logger.isTraceEnabled())
      logger.trace("didn't find catalog %s", arg0);
    return false;
   } else
    return !catalog.isReadOnly();
 }
}

代码示例来源:origin: org.apache.jclouds.api/vcloud

@Override
 public boolean apply(ReferenceType arg0) {
   // TODO: this is inefficient, calculating the index each time, but
   // shouldn't be added to constructor as the supplier is an expensive
   // call
   Map<URI, Catalog> index = catalogsByIdSupplier.get();
   Catalog catalog = index.get(arg0.getHref());
   if (catalog == null) {
    if (logger.isTraceEnabled())
      logger.trace("didn't find catalog %s", arg0);
    return false;
   } else
    return !catalog.isReadOnly();
 }
}

代码示例来源:origin: io.cloudsoft.jclouds.api/vcloud

@Override
 public boolean apply(ReferenceType arg0) {
   // TODO: this is inefficient, calculating the index each time, but
   // shouldn't be added to constructor as the supplier is an expensive
   // call
   Map<URI, Catalog> index = catalogsByIdSupplier.get();
   Catalog catalog = index.get(arg0.getHref());
   if (catalog == null) {
    if (logger.isTraceEnabled())
      logger.trace("didn't find catalog %s", arg0);
    return false;
   } else
    return !catalog.isReadOnly();
 }
}

代码示例来源:origin: jclouds/legacy-jclouds

public ExecResponse runAction(String action) {
 ExecResponse returnVal;
 String command = (runAsRoot && Predicates.in(ImmutableSet.of("start", "stop", "run")).apply(action)) ? execScriptAsRoot(action)
    : execScriptAsDefaultUser(action);
 returnVal = runCommand(command);
 if (ImmutableSet.of("status", "stdout", "stderr").contains(action))
   logger.trace("<< %s(%d)", action, returnVal.getExitStatus());
 else if (computeLogger.isTraceEnabled())
   computeLogger.trace("<< %s[%s]", action, returnVal);
 else
   computeLogger.debug("<< %s(%d)", action, returnVal.getExitStatus());
 return returnVal;
}

代码示例来源:origin: org.apache.jclouds/jclouds-compute

public ExecResponse runAction(String action) {
 ExecResponse returnVal;
 String command = (runAsRoot && Predicates.in(ImmutableSet.of("start", "stop", "run")).apply(action)) ? execScriptAsRoot(action)
    : execScriptAsDefaultUser(action);
 returnVal = runCommand(command);
 if (ImmutableSet.of("status", "stdout", "stderr").contains(action))
   logger.trace("<< %s(%d)", action, returnVal.getExitStatus());
 else if (computeLogger.isTraceEnabled())
   computeLogger.trace("<< %s[%s]", action, returnVal);
 else
   computeLogger.debug("<< %s(%d)", action, returnVal.getExitStatus());
 return returnVal;
}

代码示例来源:origin: io.cloudsoft.jclouds/jclouds-compute

public ExecResponse runAction(String action) {
 ExecResponse returnVal;
 String command = (runAsRoot && Predicates.in(ImmutableSet.of("start", "stop", "run")).apply(action)) ? execScriptAsRoot(action)
    : execScriptAsDefaultUser(action);
 returnVal = runCommand(command);
 if (ImmutableSet.of("status", "stdout", "stderr").contains(action))
   logger.trace("<< %s(%d)", action, returnVal.getExitStatus());
 else if (computeLogger.isTraceEnabled())
   computeLogger.trace("<< %s[%s]", action, returnVal);
 else
   computeLogger.debug("<< %s(%d)", action, returnVal.getExitStatus());
 return returnVal;
}

代码示例来源:origin: apache/jclouds

public ExecResponse runAction(String action) {
 ExecResponse returnVal;
 String command = (runAsRoot && Predicates.in(ImmutableSet.of("start", "stop", "run")).apply(action)) ? execScriptAsRoot(action)
    : execScriptAsDefaultUser(action);
 returnVal = runCommand(command);
 if (ImmutableSet.of("status", "stdout", "stderr").contains(action))
   logger.trace("<< %s(%d)", action, returnVal.getExitStatus());
 else if (computeLogger.isTraceEnabled())
   computeLogger.trace("<< %s[%s]", action, returnVal);
 else
   computeLogger.debug("<< %s(%d)", action, returnVal.getExitStatus());
 return returnVal;
}

代码示例来源:origin: org.jclouds/jclouds-core

public T apply(HttpResponse from) {
 try {
   checkNotNull(from, "http response");
   checkNotNull(from.getPayload(), "payload in " + from);
 } catch (NullPointerException e) {
   return addDetailsAndPropagate(from, e);
 }
 InputStream is = null;
 try {
   // debug is more normally set, so trace is more appropriate for
   // something heavy like this
   if (from.getStatusCode() >= 300 || logger.isTraceEnabled())
    return convertStreamToStringAndParse(from);
   is = from.getPayload().getInput();
   return parse(new InputSource(is));
 } catch (RuntimeException e) {
   return addDetailsAndPropagate(from, e);
 } finally {
   Closeables.closeQuietly(is);
   from.getPayload().release();
 }
}

代码示例来源:origin: jclouds/legacy-jclouds

public T apply(HttpResponse from) {
 try {
   checkNotNull(from, "http response");
   checkNotNull(from.getPayload(), "payload in " + from);
 } catch (NullPointerException e) {
   return addDetailsAndPropagate(from, e);
 }
 InputStream is = null;
 try {
   // debug is more normally set, so trace is more appropriate for
   // something heavy like this
   if (from.getStatusCode() >= 300 || logger.isTraceEnabled())
    return convertStreamToStringAndParse(from);
   is = from.getPayload().getInput();
   return parse(new InputSource(is));
 } catch (RuntimeException e) {
   return addDetailsAndPropagate(from, e);
 } finally {
   Closeables.closeQuietly(is);
   from.getPayload().release();
 }
}

相关文章