org.modeshape.common.logging.Logger.log()方法的使用及代码示例

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

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

Logger.log介绍

[英]Log an exception (throwable) at the supplied level with an accompanying message. If the exception is null, then this method calls #debug(String,Object...).
[中]在提供的级别记录异常(可丢弃),并附带消息。如果异常为null,则此方法调用#debug(字符串、对象…)。

代码示例

代码示例来源:origin: org.fcrepo/modeshape-common

  1. @Override
  2. public void writeTo( Logger logger,
  3. Status firstStatus,
  4. Status... additionalStatuses ) {
  5. EnumSet<Status> stats = EnumSet.of(firstStatus, additionalStatuses);
  6. if (hasProblems()) {
  7. for (Problem problem : this) {
  8. Status status = problem.getStatus();
  9. if (!stats.contains(status)) continue;
  10. Level level = logLevelFor(status);
  11. logger.log(level, problem.getMessage(), problem.getParameters());
  12. }
  13. }
  14. }

代码示例来源:origin: org.modeshape/modeshape-common

  1. @Override
  2. public void writeTo( Logger logger,
  3. Status firstStatus,
  4. Status... additionalStatuses ) {
  5. EnumSet<Status> stats = EnumSet.of(firstStatus, additionalStatuses);
  6. if (hasProblems()) {
  7. for (Problem problem : this) {
  8. Status status = problem.getStatus();
  9. if (!stats.contains(status)) continue;
  10. Level level = logLevelFor(status);
  11. logger.log(level, problem.getMessage(), problem.getParameters());
  12. }
  13. }
  14. }

代码示例来源:origin: ModeShape/modeshape

  1. @Override
  2. public void writeTo( Logger logger,
  3. Status firstStatus,
  4. Status... additionalStatuses ) {
  5. EnumSet<Status> stats = EnumSet.of(firstStatus, additionalStatuses);
  6. if (hasProblems()) {
  7. for (Problem problem : this) {
  8. Status status = problem.getStatus();
  9. if (!stats.contains(status)) continue;
  10. Level level = logLevelFor(status);
  11. logger.log(level, problem.getMessage(), problem.getParameters());
  12. }
  13. }
  14. }

代码示例来源:origin: org.modeshape/modeshape-common

  1. @Override
  2. public void writeTo( Logger logger ) {
  3. if (hasProblems()) {
  4. for (Problem problem : this) {
  5. Level level = logLevelFor(problem.getStatus());
  6. logger.log(level, problem.getMessage(), problem.getParameters());
  7. }
  8. }
  9. }

代码示例来源:origin: org.fcrepo/modeshape-common

  1. @Override
  2. public void writeTo( Logger logger ) {
  3. if (hasProblems()) {
  4. for (Problem problem : this) {
  5. Level level = logLevelFor(problem.getStatus());
  6. logger.log(level, problem.getMessage(), problem.getParameters());
  7. }
  8. }
  9. }

代码示例来源:origin: ModeShape/modeshape

  1. @Override
  2. public void writeTo( Logger logger ) {
  3. if (hasProblems()) {
  4. for (Problem problem : this) {
  5. Level level = logLevelFor(problem.getStatus());
  6. logger.log(level, problem.getMessage(), problem.getParameters());
  7. }
  8. }
  9. }

相关文章