io.fabric8.maven.docker.util.Logger.isDebugEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(157)

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

Logger.isDebugEnabled介绍

[英]Whether debugging is enabled.
[中]是否启用调试。

代码示例

代码示例来源:origin: fabric8io/docker-maven-plugin

  1. @Override
  2. protected void processLine(String line) {
  3. if (log.isDebugEnabled()) {
  4. log.verbose("%s", line);
  5. }
  6. if (line.startsWith(prefix)) {
  7. setEnvironmentVariable(line.substring(prefix.length()));
  8. }
  9. }

代码示例来源:origin: fabric8io/docker-maven-plugin

  1. @Override
  2. public void write(byte[] b, int off, int len) throws IOException {
  3. if(log.isDebugEnabled()){
  4. String request = new String(b, off, len, Charset.forName("UTF-8"));
  5. String logValue = ascii().matchesAllOf(request) ? request : "not logged due to non-ASCII characters. ";
  6. log.debug("REQUEST %s", logValue);
  7. }
  8. out.write(b, off, len);
  9. }

代码示例来源:origin: fabric8io/docker-maven-plugin

  1. @Override
  2. public boolean removeImage(String image, boolean... forceOpt) throws DockerAccessException {
  3. boolean force = forceOpt != null && forceOpt.length > 0 && forceOpt[0];
  4. try {
  5. String url = urlBuilder.deleteImage(image, force);
  6. HttpBodyAndStatus response = delegate.delete(url, new BodyAndStatusResponseHandler(), HTTP_OK, HTTP_NOT_FOUND);
  7. if (log.isDebugEnabled()) {
  8. logRemoveResponse(JsonFactory.newJsonArray(response.getBody()));
  9. }
  10. return response.getStatusCode() == HTTP_OK;
  11. } catch (IOException e) {
  12. throw new DockerAccessException(e, "Unable to remove image [%s]", image);
  13. }
  14. }

代码示例来源:origin: fabric8io/docker-maven-plugin

  1. @Override
  2. public boolean check() {
  3. try {
  4. final ContainerDetails container = docker.getContainer(containerId);
  5. if (container == null) {
  6. log.debug("HealthWaitChecker: Container %s not found");
  7. return false;
  8. }
  9. if (container.getHealthcheck() == null) {
  10. throw new IllegalArgumentException("Can not wait for healthstate of " + imageConfigDesc +". No HEALTHCHECK configured.");
  11. }
  12. if (first) {
  13. log.info("%s: Waiting to become healthy", imageConfigDesc);
  14. log.debug("HealthWaitChecker: Waiting for healthcheck: '%s'", container.getHealthcheck());
  15. first = false;
  16. } else if (log.isDebugEnabled()) {
  17. log.debug("HealthWaitChecker: Waiting on healthcheck '%s'", container.getHealthcheck());
  18. }
  19. return container.isHealthy();
  20. } catch(DockerAccessException e) {
  21. log.warn("Error while checking health: %s", e.getMessage());
  22. return false;
  23. }
  24. }

代码示例来源:origin: fabric8io/fabric8-maven-plugin

  1. @Override
  2. public boolean isDebugEnabled() {
  3. return log.isDebugEnabled();
  4. }

相关文章