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

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

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

Logger.isDebugEnabled介绍

暂无

代码示例

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

  1. public void debug(final String msg)
  2. {
  3. if (isDebugEnabled())
  4. {
  5. log(Level.DEBUG, msg, null);
  6. }
  7. }

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

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

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

  1. public void debug(final String msg)
  2. {
  3. if (isDebugEnabled())
  4. {
  5. log(Level.DEBUG, msg, null);
  6. }
  7. }

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

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

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

  1. /**
  2. * The visitor must be initialized with the handlers to call for specific annotations
  3. */
  4. public ClassVisitorImpl(List<AnnotationHandler<Annotation>> handlers, Object payload)
  5. {
  6. handlerList = new ArrayList<AnnotationHandler<Annotation>>(handlers);
  7. Collections.sort(handlerList, new WeightedComparator());
  8. this.payload = payload;
  9. if (log.isDebugEnabled())
  10. {
  11. log.debug("Initialized to use {} AnnotationHandlers..", handlers.size());
  12. }
  13. }

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

  1. /**
  2. * The visitor must be initialized with the handlers to call for specific annotations
  3. */
  4. public ClassVisitorImpl(List<AnnotationHandler<Annotation>> handlers, Object payload)
  5. {
  6. handlerList = new ArrayList<AnnotationHandler<Annotation>>(handlers);
  7. Collections.sort(handlerList, new WeightedComparator());
  8. this.payload = payload;
  9. if (log.isDebugEnabled())
  10. {
  11. log.debug("Initialized to use {} AnnotationHandlers..", handlers.size());
  12. }
  13. }

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

  1. @Override
  2. public <T> void enrich(final T service)
  3. {
  4. SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(service);
  5. if (log.isDebugEnabled())
  6. log.debug("Enriched instance of service [" + service.getClass().getName() + "]");
  7. }

代码示例来源:origin: org.ocpsoft.rewrite/rewrite-integration-spring

  1. @Override
  2. public <T> void enrich(final T service)
  3. {
  4. SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(service);
  5. if (log.isDebugEnabled())
  6. log.debug("Enriched instance of service [" + service.getClass().getName() + "]");
  7. }

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

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

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

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

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

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

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

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

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

  1. @SuppressWarnings("unchecked")
  2. @Override
  3. public <T> Collection<T> produce(final Class<T> type)
  4. {
  5. Collection<T> result = new ArrayList<T>();
  6. BeanManager manager = getBeanManager();
  7. Set<Bean<?>> beans = manager.getBeans(type);
  8. for (Bean<?> bean : beans) {
  9. if (bean != null)
  10. {
  11. CreationalContext<T> context = (CreationalContext<T>) manager.createCreationalContext(bean);
  12. if (context != null)
  13. {
  14. result.add((T) manager.getReference(bean, type, context));
  15. if (log.isDebugEnabled())
  16. {
  17. log.debug("Created CDI enriched service [" + bean.toString() + "]");
  18. }
  19. }
  20. }
  21. }
  22. return result;
  23. }

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

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

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

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

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

  1. @Override
  2. @SuppressWarnings("unchecked")
  3. public <T> void enrich(final T service)
  4. {
  5. if (service != null)
  6. {
  7. BeanManager manager = getBeanManager();
  8. CreationalContext<Object> context = manager.createCreationalContext(null);
  9. InjectionTarget<Object> injectionTarget = (InjectionTarget<Object>) manager
  10. .createInjectionTarget(manager.createAnnotatedType(service.getClass()));
  11. injectionTarget.inject(service, context);
  12. if ((context != null) && log.isDebugEnabled())
  13. {
  14. log.debug("Enriched non-contextual instance of service [" + service.getClass().getName() + "]");
  15. }
  16. }
  17. }

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

  1. break;
  2. case DEBUG:
  3. if (log.isDebugEnabled())
  4. log.debug(buildLogOutput(event).toString());
  5. break;

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

  1. public Configuration getConfiguration(ServletContext context)
  2. {
  3. if (!ContextUtil.getInitParamBoolean(context, DISABLED_PARAM))
  4. {
  5. if (log.isDebugEnabled())
  6. log.debug(DISABLED_PARAM + " [false]");
  7. if (config == null)
  8. {
  9. String contextPath = context.getContextPath();
  10. if (contextPath == null || contextPath.isEmpty())
  11. contextPath = "/";
  12. config = ConfigurationBuilder
  13. .begin()
  14. .addRule()
  15. .perform(Response
  16. .addCookie(new Cookie("org.ocpsoft.rewrite.gwt.history.contextPath", contextPath)))
  17. .addRule()
  18. .when(Method.isHead().and(
  19. Query.parameterExists("org.ocpsoft.rewrite.gwt.history.contextPath")))
  20. .perform(Response.setStatus(200).and(
  21. Response.addHeader("org.ocpsoft.rewrite.gwt.history.contextPath",
  22. contextPath)));
  23. }
  24. }
  25. return config;
  26. }

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

相关文章