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

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

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

Logger.error介绍

暂无

代码示例

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

  1. log.error("unable to find urlrewrite conf file at " + confPath);
  2. log.error("unloading existing conf");
  3. urlRewriter = null;

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

  1. private static Object executeProviderCallable(Rewrite event, EvaluationContext context,
  2. ProviderCallable<Object> providerCallable)
  3. {
  4. List<Exception> exceptions = new ArrayList<Exception>();
  5. for (ExpressionLanguageProvider provider : getProviders()) {
  6. try
  7. {
  8. return providerCallable.call(event, context, provider);
  9. }
  10. catch (RuntimeException e) {
  11. throw e;
  12. }
  13. catch (Exception e)
  14. {
  15. exceptions.add(e);
  16. }
  17. }
  18. for (Exception exception : exceptions) {
  19. log.error("DEFERRED EXCEPTION", exception);
  20. }
  21. throw new RewriteException("No registered " + ExpressionLanguageProvider.class.getName()
  22. + " could handle the Expression [" + providerCallable.getExpression() + "]");
  23. }

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

  1. private static Object executeProviderCallable(Rewrite event, EvaluationContext context,
  2. ProviderCallable<Object> providerCallable)
  3. {
  4. List<Exception> exceptions = new ArrayList<Exception>();
  5. for (ExpressionLanguageProvider provider : getProviders()) {
  6. try
  7. {
  8. return providerCallable.call(event, context, provider);
  9. }
  10. catch (RuntimeException e) {
  11. throw e;
  12. }
  13. catch (Exception e)
  14. {
  15. exceptions.add(e);
  16. }
  17. }
  18. for (Exception exception : exceptions) {
  19. log.error("DEFERRED EXCEPTION", exception);
  20. }
  21. throw new RewriteException("No registered " + ExpressionLanguageProvider.class.getName()
  22. + " could handle the Expression [" + providerCallable.getExpression() + "]");
  23. }

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

  1. private static Object executeProviderCallable(Rewrite event, EvaluationContext context,
  2. ProviderCallable<Object> providerCallable)
  3. {
  4. List<Exception> exceptions = new ArrayList<Exception>();
  5. for (ExpressionLanguageProvider provider : getProviders()) {
  6. try
  7. {
  8. return providerCallable.call(event, context, provider);
  9. }
  10. catch (RuntimeException e) {
  11. throw e;
  12. }
  13. catch (Exception e)
  14. {
  15. exceptions.add(e);
  16. }
  17. }
  18. for (Exception exception : exceptions) {
  19. log.error("DEFERRED EXCEPTION", exception);
  20. }
  21. throw new RewriteException("No registered " + ExpressionLanguageProvider.class.getName()
  22. + " could handle the Expression [" + providerCallable.getExpression() + "]");
  23. }

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

  1. log.error("Failed to read JAR file: " + jarUrl.toString(), e);

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

  1. log.error("Failed to read JAR file: " + jarUrl.toString(), e);

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

  1. case ERROR:
  2. if (log.isErrorEnabled())
  3. log.error(buildLogOutput(event).toString());
  4. break;
  5. case DEBUG:

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

  1. case ERROR:
  2. if (log.isErrorEnabled())
  3. log.error(buildLogOutput(event).toString());
  4. break;
  5. case DEBUG:

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

  1. log.error(message);
  2. throw e;

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

  1. log.error(message);
  2. throw e;

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

  1. private void checkConfLocal(final Conf conf)
  2. {
  3. if (conf.isOk() && conf.isEngineEnabled()) {
  4. urlRewriter = new UrlRewriter(conf);
  5. log.debug("Tuckey UrlRewriteFilter configuration loaded (Status: OK)");
  6. }
  7. else {
  8. if (!conf.isOk()) {
  9. log.error("Tuckey UrlRewriteFilter configuration failed (Status: ERROR)");
  10. }
  11. if (!conf.isEngineEnabled()) {
  12. log.warn("Tuckey UrlRewriteFilter engine explicitly disabled in configuration");
  13. }
  14. if (urlRewriter != null) {
  15. log.debug("Tuckey UrlRewriteFilter configuration unloaded");
  16. urlRewriter = null;
  17. }
  18. }
  19. }

代码示例来源: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: 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. }

代码示例来源: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. }

相关文章