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

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

本文整理了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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1. public ExecResponse runAction(String action) {
  2. ExecResponse returnVal;
  3. String command = (runAsRoot && Predicates.in(ImmutableSet.of("start", "stop", "run")).apply(action)) ? execScriptAsRoot(action)
  4. : execScriptAsDefaultUser(action);
  5. returnVal = runCommand(command);
  6. if (ImmutableSet.of("status", "stdout", "stderr").contains(action))
  7. logger.trace("<< %s(%d)", action, returnVal.getExitStatus());
  8. else if (computeLogger.isTraceEnabled())
  9. computeLogger.trace("<< %s[%s]", action, returnVal);
  10. else
  11. computeLogger.debug("<< %s(%d)", action, returnVal.getExitStatus());
  12. return returnVal;
  13. }

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

  1. public ExecResponse runAction(String action) {
  2. ExecResponse returnVal;
  3. String command = (runAsRoot && Predicates.in(ImmutableSet.of("start", "stop", "run")).apply(action)) ? execScriptAsRoot(action)
  4. : execScriptAsDefaultUser(action);
  5. returnVal = runCommand(command);
  6. if (ImmutableSet.of("status", "stdout", "stderr").contains(action))
  7. logger.trace("<< %s(%d)", action, returnVal.getExitStatus());
  8. else if (computeLogger.isTraceEnabled())
  9. computeLogger.trace("<< %s[%s]", action, returnVal);
  10. else
  11. computeLogger.debug("<< %s(%d)", action, returnVal.getExitStatus());
  12. return returnVal;
  13. }

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

  1. public ExecResponse runAction(String action) {
  2. ExecResponse returnVal;
  3. String command = (runAsRoot && Predicates.in(ImmutableSet.of("start", "stop", "run")).apply(action)) ? execScriptAsRoot(action)
  4. : execScriptAsDefaultUser(action);
  5. returnVal = runCommand(command);
  6. if (ImmutableSet.of("status", "stdout", "stderr").contains(action))
  7. logger.trace("<< %s(%d)", action, returnVal.getExitStatus());
  8. else if (computeLogger.isTraceEnabled())
  9. computeLogger.trace("<< %s[%s]", action, returnVal);
  10. else
  11. computeLogger.debug("<< %s(%d)", action, returnVal.getExitStatus());
  12. return returnVal;
  13. }

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

  1. public ExecResponse runAction(String action) {
  2. ExecResponse returnVal;
  3. String command = (runAsRoot && Predicates.in(ImmutableSet.of("start", "stop", "run")).apply(action)) ? execScriptAsRoot(action)
  4. : execScriptAsDefaultUser(action);
  5. returnVal = runCommand(command);
  6. if (ImmutableSet.of("status", "stdout", "stderr").contains(action))
  7. logger.trace("<< %s(%d)", action, returnVal.getExitStatus());
  8. else if (computeLogger.isTraceEnabled())
  9. computeLogger.trace("<< %s[%s]", action, returnVal);
  10. else
  11. computeLogger.debug("<< %s(%d)", action, returnVal.getExitStatus());
  12. return returnVal;
  13. }

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

  1. public T apply(HttpResponse from) {
  2. try {
  3. checkNotNull(from, "http response");
  4. checkNotNull(from.getPayload(), "payload in " + from);
  5. } catch (NullPointerException e) {
  6. return addDetailsAndPropagate(from, e);
  7. }
  8. InputStream is = null;
  9. try {
  10. // debug is more normally set, so trace is more appropriate for
  11. // something heavy like this
  12. if (from.getStatusCode() >= 300 || logger.isTraceEnabled())
  13. return convertStreamToStringAndParse(from);
  14. is = from.getPayload().getInput();
  15. return parse(new InputSource(is));
  16. } catch (RuntimeException e) {
  17. return addDetailsAndPropagate(from, e);
  18. } finally {
  19. Closeables.closeQuietly(is);
  20. from.getPayload().release();
  21. }
  22. }

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

  1. public T apply(HttpResponse from) {
  2. try {
  3. checkNotNull(from, "http response");
  4. checkNotNull(from.getPayload(), "payload in " + from);
  5. } catch (NullPointerException e) {
  6. return addDetailsAndPropagate(from, e);
  7. }
  8. InputStream is = null;
  9. try {
  10. // debug is more normally set, so trace is more appropriate for
  11. // something heavy like this
  12. if (from.getStatusCode() >= 300 || logger.isTraceEnabled())
  13. return convertStreamToStringAndParse(from);
  14. is = from.getPayload().getInput();
  15. return parse(new InputSource(is));
  16. } catch (RuntimeException e) {
  17. return addDetailsAndPropagate(from, e);
  18. } finally {
  19. Closeables.closeQuietly(is);
  20. from.getPayload().release();
  21. }
  22. }

相关文章