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

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

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

Logger.isTraceEnabled介绍

暂无

代码示例

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

public void trace(final String msg)
{
 if (isTraceEnabled())
 {
   log(Level.TRACE, msg, null);
 }
}

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

public void trace(final String msg, final Throwable t)
{
 if (isTraceEnabled())
 {
   log(Level.TRACE, msg, t);
 }
}

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

public void trace(final String msg)
{
 if (isTraceEnabled())
 {
   log(Level.TRACE, msg, null);
 }
}

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

public void trace(final String msg, final Throwable t)
{
 if (isTraceEnabled())
 {
   log(Level.TRACE, msg, t);
 }
}

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

public void trace(final String msg, final Object[] argArray)
{
 if (isTraceEnabled())
 {
   log(Level.TRACE, format(msg, argArray), null);
 }
}

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

public void trace(final String msg, final Object arg1, final Object arg2)
{
 if (isTraceEnabled())
 {
   log(Level.TRACE, format(msg, new Object[] { arg1, arg2 }), null);
 }
}

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

public void trace(final String msg, final Object[] argArray)
{
 if (isTraceEnabled())
 {
   log(Level.TRACE, format(msg, argArray), null);
 }
}

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

public void trace(final String msg, final Object arg)
{
 if (isTraceEnabled())
 {
   log(Level.TRACE, format(msg, new Object[] { arg }), null);
 }
}

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

public void trace(final String msg, final Object arg)
{
 if (isTraceEnabled())
 {
   log(Level.TRACE, format(msg, new Object[] { arg }), null);
 }
}

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

public void trace(final String msg, final Object arg1, final Object arg2)
{
 if (isTraceEnabled())
 {
   log(Level.TRACE, format(msg, new Object[] { arg1, arg2 }), null);
 }
}

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

if (log.isTraceEnabled()) {
 log.trace("Service provider [{}] returned [{}] for class [{}]", new Object[] {
      resolver.getClass().getSimpleName(), beanName, clazz.getName()
      .toString();
 if (log.isTraceEnabled()) {
   log.debug("Creation of EL expression for component [{}] of class [{}] successful: {}", new Object[] {
       component, clazz.getName(), el

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

/**
* Process one {@link AnnotatedElement} of the class.
*/
private void visit(AnnotatedElement element, ClassContext context)
{
 List<AnnotationHandler<Annotation>> elementHandlers = new ArrayList<AnnotationHandler<Annotation>>();
 // check if any of the handlers is responsible
 for (AnnotationHandler<Annotation> handler : handlerList)
 {
   // each annotation on the element may be interesting for us
   for (Annotation annotation : element.getAnnotations())
   {
    if (handler.handles().equals(annotation.annotationType()))
    {
      elementHandlers.add(handler);
    }
   }
 }
 if (!elementHandlers.isEmpty())
 {
   if (log.isTraceEnabled())
   {
    log.trace("Executing handler chain on " + element + ": " + elementHandlers);
   }
   // execute the handler chain
   new HandlerChainImpl(context, element, elementHandlers).proceed();
 }
}

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

/**
* Process one {@link AnnotatedElement} of the class.
*/
private void visit(AnnotatedElement element, ClassContext context)
{
 List<AnnotationHandler<Annotation>> elementHandlers = new ArrayList<AnnotationHandler<Annotation>>();
 // check if any of the handlers is responsible
 for (AnnotationHandler<Annotation> handler : handlerList)
 {
   // each annotation on the element may be interesting for us
   for (Annotation annotation : element.getAnnotations())
   {
    if (handler.handles().equals(annotation.annotationType()))
    {
      elementHandlers.add(handler);
    }
   }
 }
 if (!elementHandlers.isEmpty())
 {
   if (log.isTraceEnabled())
   {
    log.trace("Executing handler chain on " + element + ": " + elementHandlers);
   }
   // execute the handler chain
   new HandlerChainImpl(context, element, elementHandlers).proceed();
 }
}

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

@Override
public void process(FieldContext context, Matches annotation, HandlerChain chain)
{
 // obtain the parameter for the current field
 ParameterBuilder<?> parameterBuilder =
      (ParameterBuilder<?>) context.get(ParameterBuilder.class);
 if (parameterBuilder == null) {
   throw new IllegalStateException("Cound not find any binding for field: " +
       context.getJavaField().getName());
 }
 // add a corresponding RegexConstraint
 String expr = annotation.value();
 parameterBuilder.constrainedBy(new RegexConstraint(expr));
 if (log.isTraceEnabled()) {
   log.trace("Parameter [{}] has been constrained by [{}]", parameterBuilder.getName(), expr);
 }
 // proceed with the chain
 chain.proceed();
}

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

@Override
public void process(FieldContext context, Matches annotation, HandlerChain chain)
{
 // obtain the parameter for the current field
 ParameterBuilder<?> parameterBuilder =
      (ParameterBuilder<?>) context.get(ParameterBuilder.class);
 if (parameterBuilder == null) {
   throw new IllegalStateException("Cound not find any binding for field: " +
       context.getJavaField().getName());
 }
 // add a corresponding RegexConstraint
 String expr = annotation.value();
 parameterBuilder.constrainedBy(new RegexConstraint(expr));
 if (log.isTraceEnabled()) {
   log.trace("Parameter [{}] has been constrained by [{}]", parameterBuilder.getName(), expr);
 }
 // proceed with the chain
 chain.proceed();
}

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

break;
case TRACE:
  if (log.isTraceEnabled())
   log.trace(buildLogOutput(event).toString());
  break;

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

@Override
public void perform(Rewrite event, EvaluationContext context)
{
 String message = messageBuilder.build(event, context);
 switch (level)
 {
 case TRACE:
   if (log.isTraceEnabled())
    log.trace(message);
   break;
 case DEBUG:
   if (log.isDebugEnabled())
    log.debug(message);
   break;
 case INFO:
   if (log.isInfoEnabled())
    log.info(message);
   break;
 case WARN:
   if (log.isWarnEnabled())
    log.warn(message);
   break;
 case ERROR:
   if (log.isErrorEnabled())
    log.error(message);
   break;
 default:
   break;
 }
}

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

@Override
public void perform(Rewrite event, EvaluationContext context)
{
 String message = messageBuilder.build(event, context);
 switch (level)
 {
 case TRACE:
   if (log.isTraceEnabled())
    log.trace(message);
   break;
 case DEBUG:
   if (log.isDebugEnabled())
    log.debug(message);
   break;
 case INFO:
   if (log.isInfoEnabled())
    log.info(message);
   break;
 case WARN:
   if (log.isWarnEnabled())
    log.warn(message);
   break;
 case ERROR:
   if (log.isErrorEnabled())
    log.error(message);
   break;
 default:
   break;
 }
}

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

相关文章