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

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

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

Logger.isWarnEnabled介绍

暂无

代码示例

代码示例来源:origin: org.ocpsoft.logging/logging-api

  1. public void warn(final String msg)
  2. {
  3. if (isWarnEnabled())
  4. {
  5. log(Level.WARN, msg, null);
  6. }
  7. }

代码示例来源:origin: org.ocpsoft.logging/logging-api

  1. public void warn(final String msg, final Throwable t)
  2. {
  3. if (isWarnEnabled())
  4. {
  5. log(Level.WARN, msg, t);
  6. }
  7. }

代码示例来源:origin: ocpsoft/rewrite

  1. public void warn(final String msg)
  2. {
  3. if (isWarnEnabled())
  4. {
  5. log(Level.WARN, msg, null);
  6. }
  7. }

代码示例来源:origin: ocpsoft/rewrite

  1. public void warn(final String msg, final Throwable t)
  2. {
  3. if (isWarnEnabled())
  4. {
  5. log(Level.WARN, msg, t);
  6. }
  7. }

代码示例来源:origin: org.ocpsoft.logging/logging-api

  1. public void warn(final String msg, final Object arg)
  2. {
  3. if (isWarnEnabled())
  4. {
  5. log(Level.WARN, format(msg, new Object[] { arg }), null);
  6. }
  7. }

代码示例来源:origin: ocpsoft/rewrite

  1. public void warn(final String msg, final Object[] argArray)
  2. {
  3. if (isWarnEnabled())
  4. {
  5. log(Level.WARN, format(msg, argArray), null);
  6. }
  7. }

代码示例来源:origin: ocpsoft/rewrite

  1. public void warn(final String msg, final Object arg1, final Object arg2)
  2. {
  3. if (isWarnEnabled())
  4. {
  5. log(Level.WARN, format(msg, new Object[] { arg1, arg2 }), null);
  6. }
  7. }

代码示例来源:origin: org.ocpsoft.logging/logging-api

  1. public void warn(final String msg, final Object arg1, final Object arg2)
  2. {
  3. if (isWarnEnabled())
  4. {
  5. log(Level.WARN, format(msg, new Object[] { arg1, arg2 }), null);
  6. }
  7. }

代码示例来源:origin: org.ocpsoft.logging/logging-api

  1. public void warn(final String msg, final Object[] argArray)
  2. {
  3. if (isWarnEnabled())
  4. {
  5. log(Level.WARN, format(msg, argArray), null);
  6. }
  7. }

代码示例来源:origin: ocpsoft/rewrite

  1. public void warn(final String msg, final Object arg)
  2. {
  3. if (isWarnEnabled())
  4. {
  5. log(Level.WARN, format(msg, new Object[] { arg }), null);
  6. }
  7. }

代码示例来源:origin: ocpsoft/rewrite

  1. break;
  2. case WARN:
  3. if (log.isWarnEnabled())
  4. log.warn(buildLogOutput(event).toString());
  5. break;

代码示例来源:origin: ocpsoft/rewrite

  1. break;
  2. case WARN:
  3. if (log.isWarnEnabled())
  4. log.warn(buildLogOutput(event).toString());
  5. break;

代码示例来源:origin: ocpsoft/rewrite

  1. @Override
  2. public void perform(Rewrite event, EvaluationContext context)
  3. {
  4. String message = messageBuilder.build(event, context);
  5. switch (level)
  6. {
  7. case TRACE:
  8. if (log.isTraceEnabled())
  9. log.trace(message);
  10. break;
  11. case DEBUG:
  12. if (log.isDebugEnabled())
  13. log.debug(message);
  14. break;
  15. case INFO:
  16. if (log.isInfoEnabled())
  17. log.info(message);
  18. break;
  19. case WARN:
  20. if (log.isWarnEnabled())
  21. log.warn(message);
  22. break;
  23. case ERROR:
  24. if (log.isErrorEnabled())
  25. log.error(message);
  26. break;
  27. default:
  28. break;
  29. }
  30. }

代码示例来源:origin: ocpsoft/rewrite

  1. @Override
  2. public void perform(Rewrite event, EvaluationContext context)
  3. {
  4. String message = messageBuilder.build(event, context);
  5. switch (level)
  6. {
  7. case TRACE:
  8. if (log.isTraceEnabled())
  9. log.trace(message);
  10. break;
  11. case DEBUG:
  12. if (log.isDebugEnabled())
  13. log.debug(message);
  14. break;
  15. case INFO:
  16. if (log.isInfoEnabled())
  17. log.info(message);
  18. break;
  19. case WARN:
  20. if (log.isWarnEnabled())
  21. log.warn(message);
  22. break;
  23. case ERROR:
  24. if (log.isErrorEnabled())
  25. log.error(message);
  26. break;
  27. default:
  28. break;
  29. }
  30. }

代码示例来源:origin: org.ocpsoft.rewrite/rewrite-impl-servlet

  1. if (log.isWarnEnabled())
  2. log.warn("No Rewrite event was produced - RewriteFilter disabled on this request.");
  3. chain.doFilter(request, response);
  4. log.debug("RewriteFilter passing control of request to underlying application.");
  5. if (response.isCommitted() && log.isWarnEnabled())
  6. log.warn("Response has already been committed, and further write operations are not permitted. "
  7. + "This may result in an IllegalStateException being triggered by the underlying application. To avoid this situation, "

代码示例来源:origin: org.jboss.windup.config/windup-config-api

  1. @Override
  2. public void perform(Rewrite event, EvaluationContext context)
  3. {
  4. // Quite verbose. TODO: ... See https://github.com/ocpsoft/logging/issues/1
  5. switch (level)
  6. {
  7. case TRACE:
  8. if (log.isTraceEnabled())
  9. log.trace(messageBuilder.build(event, context));
  10. break;
  11. case DEBUG:
  12. if (log.isDebugEnabled())
  13. log.debug(messageBuilder.build(event, context));
  14. break;
  15. case INFO:
  16. if (log.isInfoEnabled())
  17. log.info(messageBuilder.build(event, context));
  18. break;
  19. case WARN:
  20. if (log.isWarnEnabled())
  21. log.warn(messageBuilder.build(event, context));
  22. break;
  23. case ERROR:
  24. if (log.isErrorEnabled())
  25. log.error(messageBuilder.build(event, context));
  26. break;
  27. }
  28. }

代码示例来源:origin: org.ocpsoft.rewrite/rewrite-impl-servlet

  1. if (log.isWarnEnabled())
  2. log.warn("No ConfigurationProviders were registered: " +
  3. "Rewrite will not be enabled on this application. " +

代码示例来源:origin: ocpsoft/rewrite

  1. if (log.isWarnEnabled())
  2. log.warn("No ConfigurationProviders were registered: " +
  3. "Rewrite will not be enabled on this application. " +

代码示例来源:origin: ocpsoft/rewrite

  1. if (log.isWarnEnabled())
  2. log.warn("No ConfigurationProviders were registered: " +
  3. "Rewrite will not be enabled on this application. " +

代码示例来源:origin: windup/windup

  1. @Override
  2. public void perform(Rewrite event, EvaluationContext context)
  3. {
  4. // Quite verbose. TODO: ... See https://github.com/ocpsoft/logging/issues/1
  5. switch (level)
  6. {
  7. case TRACE:
  8. if (log.isTraceEnabled())
  9. log.trace(messageBuilder.build(event, context));
  10. break;
  11. case DEBUG:
  12. if (log.isDebugEnabled())
  13. log.debug(messageBuilder.build(event, context));
  14. break;
  15. case INFO:
  16. if (log.isInfoEnabled())
  17. log.info(messageBuilder.build(event, context));
  18. break;
  19. case WARN:
  20. if (log.isWarnEnabled())
  21. log.warn(messageBuilder.build(event, context));
  22. break;
  23. case ERROR:
  24. if (log.isErrorEnabled())
  25. log.error(messageBuilder.build(event, context));
  26. break;
  27. }
  28. }

相关文章