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

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

本文整理了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

public void debug(final String msg)
{
 if (isDebugEnabled())
 {
   log(Level.DEBUG, msg, null);
 }
}

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

public void debug(final String msg, final Throwable t)
{
 if (isDebugEnabled())
 {
   log(Level.DEBUG, msg, t);
 }
}

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

public void debug(final String msg)
{
 if (isDebugEnabled())
 {
   log(Level.DEBUG, msg, null);
 }
}

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

public void debug(final String msg, final Throwable t)
{
 if (isDebugEnabled())
 {
   log(Level.DEBUG, msg, t);
 }
}

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

/**
* The visitor must be initialized with the handlers to call for specific annotations
*/
public ClassVisitorImpl(List<AnnotationHandler<Annotation>> handlers, Object payload)
{
 handlerList = new ArrayList<AnnotationHandler<Annotation>>(handlers);
 Collections.sort(handlerList, new WeightedComparator());
 this.payload = payload;
 if (log.isDebugEnabled())
 {
   log.debug("Initialized to use {} AnnotationHandlers..", handlers.size());
 }
}

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

/**
* The visitor must be initialized with the handlers to call for specific annotations
*/
public ClassVisitorImpl(List<AnnotationHandler<Annotation>> handlers, Object payload)
{
 handlerList = new ArrayList<AnnotationHandler<Annotation>>(handlers);
 Collections.sort(handlerList, new WeightedComparator());
 this.payload = payload;
 if (log.isDebugEnabled())
 {
   log.debug("Initialized to use {} AnnotationHandlers..", handlers.size());
 }
}

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

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

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

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

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

public void debug(final String msg, final Object arg)
{
 if (isDebugEnabled())
 {
   log(Level.DEBUG, format(msg, new Object[] { arg }), null);
 }
}

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

public void debug(final String msg, final Object arg1, final Object arg2)
{
 if (isDebugEnabled())
 {
   log(Level.DEBUG, format(msg, new Object[] { arg1, arg2 }), null);
 }
}

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

public void debug(final String msg, final Object[] argArray)
{
 if (isDebugEnabled())
 {
   log(Level.DEBUG, format(msg, argArray), null);
 }
}

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

public void debug(final String msg, final Object arg1, final Object arg2)
{
 if (isDebugEnabled())
 {
   log(Level.DEBUG, format(msg, new Object[] { arg1, arg2 }), null);
 }
}

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

@SuppressWarnings("unchecked")
@Override
public <T> Collection<T> produce(final Class<T> type)
{
 Collection<T> result = new ArrayList<T>();
 BeanManager manager = getBeanManager();
 Set<Bean<?>> beans = manager.getBeans(type);
 for (Bean<?> bean : beans) {
   if (bean != null)
   {
    CreationalContext<T> context = (CreationalContext<T>) manager.createCreationalContext(bean);
    if (context != null)
    {
      result.add((T) manager.getReference(bean, type, context));
      if (log.isDebugEnabled())
      {
       log.debug("Created CDI enriched service [" + bean.toString() + "]");
      }
    }
   }
 }
 return result;
}

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

public void debug(final String msg, final Object arg)
{
 if (isDebugEnabled())
 {
   log(Level.DEBUG, format(msg, new Object[] { arg }), null);
 }
}

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

public void debug(final String msg, final Object[] argArray)
{
 if (isDebugEnabled())
 {
   log(Level.DEBUG, format(msg, argArray), null);
 }
}

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

@Override
@SuppressWarnings("unchecked")
public <T> void enrich(final T service)
{
 if (service != null)
 {
   BeanManager manager = getBeanManager();
   CreationalContext<Object> context = manager.createCreationalContext(null);
   InjectionTarget<Object> injectionTarget = (InjectionTarget<Object>) manager
       .createInjectionTarget(manager.createAnnotatedType(service.getClass()));
   injectionTarget.inject(service, context);
   if ((context != null) && log.isDebugEnabled())
   {
    log.debug("Enriched non-contextual instance of service [" + service.getClass().getName() + "]");
   }
 }
}

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

break;
case DEBUG:
  if (log.isDebugEnabled())
   log.debug(buildLogOutput(event).toString());
  break;

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

public Configuration getConfiguration(ServletContext context)
{
 if (!ContextUtil.getInitParamBoolean(context, DISABLED_PARAM))
 {
   if (log.isDebugEnabled())
    log.debug(DISABLED_PARAM + " [false]");
   if (config == null)
   {
    String contextPath = context.getContextPath();
    if (contextPath == null || contextPath.isEmpty())
      contextPath = "/";
    config = ConfigurationBuilder
         .begin()
         .addRule()
         .perform(Response
             .addCookie(new Cookie("org.ocpsoft.rewrite.gwt.history.contextPath", contextPath)))
         .addRule()
         .when(Method.isHead().and(
             Query.parameterExists("org.ocpsoft.rewrite.gwt.history.contextPath")))
         .perform(Response.setStatus(200).and(
             Response.addHeader("org.ocpsoft.rewrite.gwt.history.contextPath",
                  contextPath)));
   }
 }
 return config;
}

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

@Override
public void perform(Rewrite event, EvaluationContext context)
{
  // Quite verbose. TODO: ... See https://github.com/ocpsoft/logging/issues/1
  switch (level)
  {
  case TRACE:
    if (log.isTraceEnabled())
      log.trace(messageBuilder.build(event, context));
    break;
  case DEBUG:
    if (log.isDebugEnabled())
      log.debug(messageBuilder.build(event, context));
    break;
  case INFO:
    if (log.isInfoEnabled())
      log.info(messageBuilder.build(event, context));
    break;
  case WARN:
    if (log.isWarnEnabled())
      log.warn(messageBuilder.build(event, context));
    break;
  case ERROR:
    if (log.isErrorEnabled())
      log.error(messageBuilder.build(event, context));
    break;
  }
}

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

@Override
public void perform(Rewrite event, EvaluationContext context)
{
  // Quite verbose. TODO: ... See https://github.com/ocpsoft/logging/issues/1
  switch (level)
  {
  case TRACE:
    if (log.isTraceEnabled())
      log.trace(messageBuilder.build(event, context));
    break;
  case DEBUG:
    if (log.isDebugEnabled())
      log.debug(messageBuilder.build(event, context));
    break;
  case INFO:
    if (log.isInfoEnabled())
      log.info(messageBuilder.build(event, context));
    break;
  case WARN:
    if (log.isWarnEnabled())
      log.warn(messageBuilder.build(event, context));
    break;
  case ERROR:
    if (log.isErrorEnabled())
      log.error(messageBuilder.build(event, context));
    break;
  }
}

相关文章