public void debug(final String msg) { if (isDebugEnabled()) { log(Level.DEBUG, msg, null); } }
public void debug(final String msg, final Throwable t) { if (isDebugEnabled()) { log(Level.DEBUG, msg, t); } }
public void debug(final String msg) { if (isDebugEnabled()) { log(Level.DEBUG, msg, null); } }
public void debug(final String msg, final Throwable t) { if (isDebugEnabled()) { log(Level.DEBUG, msg, t); } }
/** * 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()); } }
/** * 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()); } }
@Override public <T> void enrich(final T service) { SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(service); if (log.isDebugEnabled()) log.debug("Enriched instance of service [" + service.getClass().getName() + "]"); }
@Override public <T> void enrich(final T service) { SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(service); if (log.isDebugEnabled()) log.debug("Enriched instance of service [" + service.getClass().getName() + "]"); }
public void debug(final String msg, final Object arg) { if (isDebugEnabled()) { log(Level.DEBUG, format(msg, new Object[] { arg }), null); } }
public void debug(final String msg, final Object arg1, final Object arg2) { if (isDebugEnabled()) { log(Level.DEBUG, format(msg, new Object[] { arg1, arg2 }), null); } }
public void debug(final String msg, final Object[] argArray) { if (isDebugEnabled()) { log(Level.DEBUG, format(msg, argArray), null); } }
public void debug(final String msg, final Object arg1, final Object arg2) { if (isDebugEnabled()) { log(Level.DEBUG, format(msg, new Object[] { arg1, arg2 }), null); } }
@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; }
public void debug(final String msg, final Object arg) { if (isDebugEnabled()) { log(Level.DEBUG, format(msg, new Object[] { arg }), null); } }
public void debug(final String msg, final Object[] argArray) { if (isDebugEnabled()) { log(Level.DEBUG, format(msg, argArray), null); } }
@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() + "]"); } } }
break; case DEBUG: if (log.isDebugEnabled()) log.debug(buildLogOutput(event).toString()); break;
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; }
@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; } }
@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; } }