com.jcabi.log.Logger.warn()方法的使用及代码示例

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

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

Logger.warn介绍

[英]Protocol one message, with WARN priority level.
[中]协议一消息,具有警告优先级。

代码示例

代码示例来源:origin: com.jcabi/jcabi-log

@Override
  public void uncaughtException(final Thread thread,
    final Throwable throwable) {
    Logger.warn(this, "%[exception]s", throwable);
  }
}

代码示例来源:origin: jcabi/jcabi-log

/**
 * Protocol one message, with {@code WARN} priority level.
 * @param source The source of the logging operation
 * @param msg The text message to be logged
 * @since 0.7.11
 */
public static void warn(final Object source, final String msg) {
  Logger.warn(source, msg, Logger.EMPTY);
}

代码示例来源:origin: com.jcabi/jcabi-log

/**
 * Protocol one message, with {@code WARN} priority level.
 * @param source The source of the logging operation
 * @param msg The text message to be logged
 * @since 0.7.11
 */
public static void warn(final Object source, final String msg) {
  Logger.warn(source, msg, Logger.EMPTY);
}

代码示例来源:origin: jcabi/jcabi-log

@Override
  public void uncaughtException(final Thread thread,
    final Throwable throwable) {
    Logger.warn(this, "%[exception]s", throwable);
  }
}

代码示例来源:origin: com.rexsl/rexsl

@Override
public void setAttribute(final String str, final Object obj) {
  Logger.warn(
    this, "#setAttribute('%s', ..) ignored by %s",
    str, this.getClass().getSimpleName()
  );
}

代码示例来源:origin: com.rexsl/rexsl

@Override
public void removeAttribute(final String str) {
  Logger.warn(
    this, "#removeAttribute('%s') ignored by %s",
    str, this.getClass().getSimpleName()
  );
}

代码示例来源:origin: com.jcabi/jcabi-manifests

@Override
public Collection<InputStream> fetch() throws IOException {
  final URL main = this.ctx.getResource("/META-INF/MANIFEST.MF");
  final Collection<InputStream> streams = new ArrayList<InputStream>(1);
  if (main == null) {
    Logger.warn(this, "MANIFEST.MF not found in WAR package");
  } else {
    streams.add(main.openStream());
  }
  return streams;
}

代码示例来源:origin: jcabi/jcabi-manifests

@Override
public Collection<InputStream> fetch() throws IOException {
  final URL main = this.ctx.getResource("/META-INF/MANIFEST.MF");
  final Collection<InputStream> streams = new ArrayList<InputStream>(1);
  if (main == null) {
    Logger.warn(this, "MANIFEST.MF not found in WAR package");
  } else {
    streams.add(main.openStream());
  }
  return streams;
}

代码示例来源:origin: jcabi/jcabi-github

@Override
public void remove() throws IOException {
  try {
    this.origin.remove();
  } catch (final AssertionError ex) {
    Logger.warn(this, "Failed to remove comment: %[exception]s", ex);
  }
}

代码示例来源:origin: jcabi/jcabi-github

@Override
public void patch(final JsonObject json) throws IOException {
  try {
    this.origin.patch(json);
  } catch (final AssertionError ex) {
    Logger.warn(this, "Failed to path comment: %[exception]s", ex);
  }
}

代码示例来源:origin: jcabi/jcabi-github

@Override
public void patch(final JsonObject json) throws IOException {
  try {
    this.origin.patch(json);
  } catch (final AssertionError ex) {
    Logger.warn(this, "failed to patch issue: %[exception]s", ex);
  }
}

代码示例来源:origin: com.rexsl/rexsl

@Override
  @NotNull
  public String render(@NotNull final String defect) {
    Logger.warn(this, "#render(..): %s", this.message);
    return Logger.format(
      "<html><body><pre>%s\n\n%s</pre></body></html>",
      this.message,
      defect
    );
  }
}

代码示例来源:origin: com.jcabi/jcabi-xml

@Override
public void warning(final TransformerException warning) {
  Logger.warn(
    this, "#warning(): %s",
    warning.getMessageAndLocation()
  );
  this.errors.add(warning.getMessageAndLocation());
}

代码示例来源:origin: jcabi/jcabi-xml

@Override
public void warning(final TransformerException warning) {
  Logger.warn(
    this, "#warning(): %s",
    warning.getMessageAndLocation()
  );
  this.errors.add(warning.getMessageAndLocation());
}

代码示例来源:origin: com.cognifide.aet/client-core

@Override
 public void process() throws AETException {
  Logger.warn(this, "Received unexpected status: %s. Message: %s.",
    suiteStatusResult.getStatus(), suiteStatusResult.getMessage());
 }
}

代码示例来源:origin: Cognifide/aet

@Override
 public void process() throws AETException {
  Logger.warn(this, "Received unexpected status: %s. Message: %s.",
    suiteStatusResult.getStatus(), suiteStatusResult.getMessage());
 }
}

代码示例来源:origin: com.cognifide.aet/client-core

@Override
 public void process() throws AETException {
  Logger.warn(this, "Received processing error status: %s. Message: %s.",
    suiteStatusResult.getStatus(), suiteStatusResult.getMessage());
 }
}

代码示例来源:origin: Cognifide/aet

@Override
 public void process() throws AETException {
  Logger.warn(this, "Received processing error status: %s. Message: %s.",
    suiteStatusResult.getStatus(), suiteStatusResult.getMessage());
 }
}

代码示例来源:origin: jcabi/jcabi-github

@Override
public JsonObject json() throws IOException {
  JsonObject json;
  try {
    json = this.origin.json();
  } catch (final AssertionError ex) {
    json = new MkGithub().randomRepo()
      .issues().create("", "").json();
    Logger.warn(this, "failed to fetch issue: %[exception]s", ex);
  }
  return json;
}

代码示例来源:origin: jcabi/jcabi-github

@Override
  public Comment post(final String text) throws IOException {
    Comment cmt;
    try {
      cmt = this.origin.post(text);
    } catch (final AssertionError ex) {
      Logger.warn(this, "Failed to post to GitHub: %[exception]s", ex);
      cmt = new MkGithub().randomRepo()
        .issues().create("", "")
        .comments().post(text);
    }
    return cmt;
  }
}

相关文章