* Issue #4996 Regularize logging Signed-off-by: Jan Bartel <janb@webtide.com> Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
75e4a93b3f
commit
77779ed6d8
|
@ -42,11 +42,13 @@ public class JettyDistribution
|
|||
static
|
||||
{
|
||||
Path distro = asJettyDistribution(System.getProperty("jetty.home"));
|
||||
LOG.debug("JettyDistribution(prop(jetty.home)) = " + distro);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("JettyDistribution(prop(jetty.home)) = {}", distro);
|
||||
if (distro == null)
|
||||
{
|
||||
distro = asJettyDistribution(System.getenv().get("JETTY_HOME"));
|
||||
LOG.debug("JettyDistribution(env(JETTY_HOME)) = " + distro);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("JettyDistribution(env(JETTY_HOME)) = {}", distro);
|
||||
}
|
||||
|
||||
if (distro == null)
|
||||
|
@ -54,13 +56,15 @@ public class JettyDistribution
|
|||
try
|
||||
{
|
||||
Path working = Paths.get(System.getProperty("user.dir"));
|
||||
LOG.debug("JettyDistribution(prop(user.dir)) = " + working);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("JettyDistribution(prop(user.dir)) = {}", working);
|
||||
while (distro == null && working != null)
|
||||
{
|
||||
distro = asJettyDistribution(working.resolve("jetty-distribution/target/distribution").toString());
|
||||
working = working.getParent();
|
||||
}
|
||||
LOG.debug("JettyDistribution(working.resolve(...)) = " + distro);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("JettyDistribution(working.resolve(...)) = {}", distro);
|
||||
}
|
||||
catch (Throwable th)
|
||||
{
|
||||
|
@ -74,7 +78,8 @@ public class JettyDistribution
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("JettyDistribution() FOUND = " + distro);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("JettyDistribution() FOUND = {}", distro);
|
||||
}
|
||||
DISTRIBUTION = distro;
|
||||
}
|
||||
|
@ -90,31 +95,36 @@ public class JettyDistribution
|
|||
|
||||
if (StringUtil.isBlank(jettyHome))
|
||||
{
|
||||
LOG.debug("asJettyDistribution {} is blank", jettyHome);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("asJettyDistribution {} is blank", jettyHome);
|
||||
return null;
|
||||
}
|
||||
|
||||
Path dir = Paths.get(jettyHome);
|
||||
if (!Files.exists(dir))
|
||||
{
|
||||
LOG.debug("asJettyDistribution {} does not exist", jettyHome);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("asJettyDistribution {} does not exist", jettyHome);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!Files.isDirectory(dir))
|
||||
{
|
||||
LOG.debug("asJettyDistribution {} is not a directory", jettyHome);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("asJettyDistribution {} is not a directory", jettyHome);
|
||||
return null;
|
||||
}
|
||||
|
||||
Path demoBase = dir.resolve("demo-base");
|
||||
if (!Files.exists(demoBase) || !Files.isDirectory(demoBase))
|
||||
{
|
||||
LOG.debug("asJettyDistribution {} has no demo-base", jettyHome);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("asJettyDistribution {} has no demo-base", jettyHome);
|
||||
return null;
|
||||
}
|
||||
|
||||
LOG.debug("asJettyDistribution {}", dir);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("asJettyDistribution {}", dir);
|
||||
return dir.toAbsolutePath();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
@ -77,7 +77,7 @@ public class ALPNClientConnectionFactory extends NegotiatingClientConnectionFact
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Could not initialize " + processor, x);
|
||||
LOG.debug("Could not initialize {}", processor, x);
|
||||
failure.addSuppressed(x);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -112,7 +112,7 @@ public class ConscryptServerALPNProcessor implements ALPNProcessor.Server
|
|||
public void handshakeFailed(Event event, Throwable failure)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("TLS handshake failed " + alpnConnection, failure);
|
||||
LOG.debug("TLS handshake failed {}", alpnConnection, failure);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ public class JDK9ServerALPNProcessor implements ALPNProcessor.Server, SslHandsha
|
|||
public void handshakeFailed(Event event, Throwable failure)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("TLS handshake failed " + alpnConnection, failure);
|
||||
LOG.debug("TLS handshake failed {}", alpnConnection, failure);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -612,7 +612,7 @@ public class AnnotationConfiguration extends AbstractConfiguration
|
|||
if (c.isAnnotation())
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Registering annotation handler for " + c.getName());
|
||||
LOG.debug("Registering annotation handler for {}", c.getName());
|
||||
_containerInitializerAnnotationHandlers.add(new ContainerInitializerAnnotationHandler(initializer, c));
|
||||
}
|
||||
}
|
||||
|
@ -621,14 +621,14 @@ public class AnnotationConfiguration extends AbstractConfiguration
|
|||
{
|
||||
initializer = new ContainerInitializer(service, null);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("No classes in HandlesTypes on initializer " + service.getClass());
|
||||
LOG.debug("No classes in HandlesTypes on initializer {}", service.getClass());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
initializer = new ContainerInitializer(service, null);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("No HandlesTypes annotation on initializer " + service.getClass());
|
||||
LOG.debug("No HandlesTypes annotation on initializer {}", service.getClass());
|
||||
}
|
||||
|
||||
initializers.add(initializer);
|
||||
|
|
|
@ -827,7 +827,7 @@ public class AnnotationParser
|
|||
catch (Exception ex)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Error scanning file " + file, ex);
|
||||
LOG.debug("Error scanning file {}", file, ex);
|
||||
me.add(new RuntimeException("Error scanning file " + file, ex));
|
||||
}
|
||||
}
|
||||
|
@ -998,7 +998,7 @@ public class AnnotationParser
|
|||
if (path.startsWith(".") || path.contains("/."))
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Contains hidden dirs: " + path);
|
||||
LOG.debug("Contains hidden dirs: {}", path);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -111,14 +111,14 @@ public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationH
|
|||
//JavaEE Spec 5.2.3: Field cannot be static
|
||||
if (Modifier.isStatic(field.getModifiers()))
|
||||
{
|
||||
LOG.warn("Skipping Resource annotation on " + clazz.getName() + "." + field.getName() + ": cannot be static");
|
||||
LOG.warn("Skipping Resource annotation on {}.{}: cannot be static", clazz.getName(), field.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
//JavaEE Spec 5.2.3: Field cannot be final
|
||||
if (Modifier.isFinal(field.getModifiers()))
|
||||
{
|
||||
LOG.warn("Skipping Resource annotation on " + clazz.getName() + "." + field.getName() + ": cannot be final");
|
||||
LOG.warn("Skipping Resource annotation on {}.{}: cannot be final", clazz.getName(), field.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationH
|
|||
//Check there is a JNDI entry for this annotation
|
||||
if (bound)
|
||||
{
|
||||
LOG.debug("Bound " + (mappedName == null ? name : mappedName) + " as " + name);
|
||||
LOG.debug("Bound {} as {}", (mappedName == null ? name : mappedName), name);
|
||||
// Make the Injection for it if the binding succeeded
|
||||
injection = new Injection(clazz, field, type, name, mappedName);
|
||||
injections.add(injection);
|
||||
|
@ -243,7 +243,7 @@ public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationH
|
|||
//JavaEE Spec 5.2.3: Method cannot be static
|
||||
if (Modifier.isStatic(method.getModifiers()))
|
||||
{
|
||||
LOG.warn("Skipping Resource annotation on " + clazz.getName() + "." + method.getName() + ": cannot be static");
|
||||
LOG.warn("Skipping Resource annotation on {}.{}: cannot be static", clazz.getName(), method.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -251,19 +251,19 @@ public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationH
|
|||
// only 1 parameter
|
||||
if (!method.getName().startsWith("set"))
|
||||
{
|
||||
LOG.warn("Skipping Resource annotation on " + clazz.getName() + "." + method.getName() + ": invalid java bean, does not start with 'set'");
|
||||
LOG.warn("Skipping Resource annotation on {}.{}: invalid java bean, does not start with 'set'", clazz.getName(), method.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
if (method.getParameterCount() != 1)
|
||||
{
|
||||
LOG.warn("Skipping Resource annotation on " + clazz.getName() + "." + method.getName() + ": invalid java bean, not single argument to method");
|
||||
LOG.warn("Skipping Resource annotation on {}.{}: invalid java bean, not single argument to method", clazz.getName(), method.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
if (Void.TYPE != method.getReturnType())
|
||||
{
|
||||
LOG.warn("Skipping Resource annotation on " + clazz.getName() + "." + method.getName() + ": invalid java bean, not void");
|
||||
LOG.warn("Skipping Resource annotation on {}.{}: invalid java bean, not void", clazz.getName(), method.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -332,7 +332,7 @@ public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationH
|
|||
|
||||
if (bound)
|
||||
{
|
||||
LOG.debug("Bound " + (mappedName == null ? name : mappedName) + " as " + name);
|
||||
LOG.debug("Bound {} as {}", (mappedName == null ? name : mappedName), name);
|
||||
// Make the Injection for it
|
||||
injection = new Injection(clazz, method, paramType, resourceType, name, mappedName);
|
||||
injections.add(injection);
|
||||
|
|
|
@ -45,7 +45,7 @@ public class ResourcesAnnotationHandler extends AbstractIntrospectableAnnotation
|
|||
Resource[] resArray = resources.value();
|
||||
if (resArray == null || resArray.length == 0)
|
||||
{
|
||||
LOG.warn("Skipping empty or incorrect Resources annotation on " + clazz.getName());
|
||||
LOG.warn("Skipping empty or incorrect Resources annotation on {}", clazz.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,8 @@ public class ResourcesAnnotationHandler extends AbstractIntrospectableAnnotation
|
|||
|
||||
if (!org.eclipse.jetty.plus.jndi.NamingEntryUtil.bindToENC(_context, name, mappedName))
|
||||
if (!org.eclipse.jetty.plus.jndi.NamingEntryUtil.bindToENC(_context.getServer(), name, mappedName))
|
||||
LOG.warn("Skipping Resources(Resource) annotation on " + clazz.getName() + " for name " + name + ": No resource bound at " + (mappedName == null ? name : mappedName));
|
||||
LOG.warn("Skipping Resources(Resource) annotation on {} for name {}: no resource bound at {}",
|
||||
clazz.getName(), name, (mappedName == null ? name : mappedName));
|
||||
}
|
||||
catch (NamingException e)
|
||||
{
|
||||
|
|
|
@ -65,17 +65,17 @@ public class RunAsAnnotationHandler extends AbstractIntrospectableAnnotationHand
|
|||
}
|
||||
}
|
||||
else
|
||||
LOG.warn("Bad value for @RunAs annotation on class " + clazz.getName());
|
||||
LOG.warn("Bad value for @RunAs annotation on class {}", clazz.getName());
|
||||
}
|
||||
}
|
||||
|
||||
public void handleField(String className, String fieldName, int access, String fieldType, String signature, Object value, String annotation)
|
||||
{
|
||||
LOG.warn("@RunAs annotation not applicable for fields: " + className + "." + fieldName);
|
||||
LOG.warn("@RunAs annotation not applicable for fields: {}.{}", className, fieldName);
|
||||
}
|
||||
|
||||
public void handleMethod(String className, String methodName, int access, String params, String signature, String[] exceptions, String annotation)
|
||||
{
|
||||
LOG.warn("@RunAs annotation ignored on method: " + className + "." + methodName + " " + signature);
|
||||
LOG.warn("@RunAs annotation ignored on method: {}.{} {}", className, methodName, signature);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class ServletContainerInitializersStarter extends AbstractLifeCycle imple
|
|||
try
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Calling ServletContainerInitializer " + i.getTarget().getClass().getName());
|
||||
LOG.debug("Calling ServletContainerInitializer {}", i.getTarget().getClass().getName());
|
||||
i.callStartup(_context);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
@ -83,7 +83,7 @@ public class ServletSecurityAnnotationHandler extends AbstractIntrospectableAnno
|
|||
|
||||
if (constraintsExist(servletMappings, constraintMappings))
|
||||
{
|
||||
LOG.warn("Constraints already defined for " + clazz.getName() + ", skipping ServletSecurity annotation");
|
||||
LOG.warn("Constraints already defined for {}, skipping ServletSecurity annotation", clazz.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,14 +62,14 @@ public class WebFilterAnnotation extends DiscoveredAnnotation
|
|||
Class clazz = getTargetClass();
|
||||
if (clazz == null)
|
||||
{
|
||||
LOG.warn(_className + " cannot be loaded");
|
||||
LOG.warn("{} cannot be loaded", _className);
|
||||
return;
|
||||
}
|
||||
|
||||
//Servlet Spec 8.1.2
|
||||
if (!Filter.class.isAssignableFrom(clazz))
|
||||
{
|
||||
LOG.warn(clazz.getName() + " is not assignable from javax.servlet.Filter");
|
||||
LOG.warn("{} is not assignable from javax.servlet.Filter", clazz.getName());
|
||||
return;
|
||||
}
|
||||
MetaData metaData = _context.getMetaData();
|
||||
|
@ -78,7 +78,7 @@ public class WebFilterAnnotation extends DiscoveredAnnotation
|
|||
|
||||
if (filterAnnotation.value().length > 0 && filterAnnotation.urlPatterns().length > 0)
|
||||
{
|
||||
LOG.warn(clazz.getName() + " defines both @WebFilter.value and @WebFilter.urlPatterns");
|
||||
LOG.warn("{} defines both @WebFilter.value and @WebFilter.urlPatterns", clazz.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ public class WebFilterAnnotationHandler extends AbstractDiscoverableAnnotationHa
|
|||
{
|
||||
if (annotationName == null || !"javax.servlet.annotation.WebFilter".equals(annotationName))
|
||||
return;
|
||||
LOG.warn("@WebFilter not applicable for fields: " + info.getClassInfo().getClassName() + "." + info.getFieldName());
|
||||
LOG.warn("@WebFilter not applicable for fields: {}.{}", info.getClassInfo().getClassName(), info.getFieldName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,6 +60,6 @@ public class WebFilterAnnotationHandler extends AbstractDiscoverableAnnotationHa
|
|||
{
|
||||
if (annotationName == null || !"javax.servlet.annotation.WebFilter".equals(annotationName))
|
||||
return;
|
||||
LOG.warn("@WebFilter not applicable for methods: " + info.getClassInfo().getClassName() + "." + info.getMethodName() + " " + info.getSignature());
|
||||
LOG.warn("@WebFilter not applicable for methods: {}.{} {}", info.getClassInfo().getClassName(), info.getMethodName(), info.getSignature());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class WebListenerAnnotation extends DiscoveredAnnotation
|
|||
|
||||
if (clazz == null)
|
||||
{
|
||||
LOG.warn(_className + " cannot be loaded");
|
||||
LOG.warn("{} cannot be loaded", _className);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ public class WebListenerAnnotation extends DiscoveredAnnotation
|
|||
}
|
||||
}
|
||||
else
|
||||
LOG.warn(clazz.getName() + " does not implement one of the servlet listener interfaces");
|
||||
LOG.warn("{} does not implement one of the servlet listener interfaces", clazz.getName());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
@ -49,7 +49,7 @@ public class WebListenerAnnotationHandler extends AbstractDiscoverableAnnotation
|
|||
{
|
||||
if (annotationName == null || !"javax.servlet.annotation.WebListener".equals(annotationName))
|
||||
return;
|
||||
LOG.warn("@WebListener is not applicable to fields: " + info.getClassInfo().getClassName() + "." + info.getFieldName());
|
||||
LOG.warn("@WebListener is not applicable to fields: {}.{}", info.getClassInfo().getClassName(), info.getFieldName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,6 +57,6 @@ public class WebListenerAnnotationHandler extends AbstractDiscoverableAnnotation
|
|||
{
|
||||
if (annotationName == null || !"javax.servlet.annotation.WebListener".equals(annotationName))
|
||||
return;
|
||||
LOG.warn("@WebListener is not applicable to methods: " + info.getClassInfo().getClassName() + "." + info.getMethodName() + " " + info.getSignature());
|
||||
LOG.warn("@WebListener is not applicable to methods: {}.{} {}", info.getClassInfo().getClassName(), info.getMethodName(), info.getSignature());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,14 +65,14 @@ public class WebServletAnnotation extends DiscoveredAnnotation
|
|||
|
||||
if (clazz == null)
|
||||
{
|
||||
LOG.warn(_className + " cannot be loaded");
|
||||
LOG.warn("{} cannot be loaded", _className);
|
||||
return;
|
||||
}
|
||||
|
||||
//Servlet Spec 8.1.1
|
||||
if (!HttpServlet.class.isAssignableFrom(clazz))
|
||||
{
|
||||
LOG.warn(clazz.getName() + " is not assignable from javax.servlet.http.HttpServlet");
|
||||
LOG.warn("{} is not assignable from javax.servlet.http.HttpServlet", clazz.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ public class WebServletAnnotation extends DiscoveredAnnotation
|
|||
|
||||
if (annotation.urlPatterns().length > 0 && annotation.value().length > 0)
|
||||
{
|
||||
LOG.warn(clazz.getName() + " defines both @WebServlet.value and @WebServlet.urlPatterns");
|
||||
LOG.warn("{} defines both @WebServlet.value and @WebServlet.urlPatterns", clazz.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ public class WebServletAnnotation extends DiscoveredAnnotation
|
|||
|
||||
if (urlPatterns.length == 0)
|
||||
{
|
||||
LOG.warn(clazz.getName() + " defines neither @WebServlet.value nor @WebServlet.urlPatterns");
|
||||
LOG.warn("{} defines neither @WebServlet.value nor @WebServlet.urlPatterns", clazz.getName());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,12 +88,12 @@ public class CdiServletContainerInitializer implements ServletContainerInitializ
|
|||
}
|
||||
|
||||
context.setAttribute(CDI_INTEGRATION_ATTRIBUTE, mode);
|
||||
LOG.info(mode + " enabled in " + ctx);
|
||||
LOG.info("{} enabled in {}", mode, ctx);
|
||||
}
|
||||
catch (UnsupportedOperationException | ClassNotFoundException e)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("CDI not found in " + ctx, e);
|
||||
LOG.debug("CDI not found in {}", ctx, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ public class CdiSpiDecorator implements Decorator
|
|||
}
|
||||
catch (Throwable th)
|
||||
{
|
||||
LOG.warn("Unable to decorate " + o, th);
|
||||
LOG.warn("Unable to decorate {}", o, th);
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ public class CdiSpiDecorator implements Decorator
|
|||
}
|
||||
catch (Throwable th)
|
||||
{
|
||||
LOG.warn("Unable to destroy " + o, th);
|
||||
LOG.warn("Unable to destroy {}", o, th);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ public abstract class AuthenticationProtocolHandler implements ProtocolHandler
|
|||
if (result.getResponseFailure() != null)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Authentication challenge failed {}", result.getFailure());
|
||||
LOG.debug("Authentication challenge failed", result.getFailure());
|
||||
forwardFailureComplete(request, result.getRequestFailure(), response, result.getResponseFailure());
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -496,7 +496,7 @@ public abstract class HttpReceiver
|
|||
return false;
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Response failure " + exchange.getResponse(), failure);
|
||||
LOG.debug("Response failure {}", exchange.getResponse(), failure);
|
||||
|
||||
// Mark atomically the response as completed, with respect
|
||||
// to concurrency between response success and response failure.
|
||||
|
|
|
@ -226,7 +226,7 @@ public abstract class HttpSender
|
|||
return;
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Request failure " + exchange.getRequest(), failure);
|
||||
LOG.debug("Request failure {}", exchange.getRequest(), failure);
|
||||
|
||||
// Mark atomically the request as completed, with respect
|
||||
// to concurrency between request success and request failure.
|
||||
|
|
|
@ -90,6 +90,6 @@ public class LeakTrackingConnectionPool extends DuplexConnectionPool
|
|||
|
||||
protected void leaked(LeakDetector.LeakInfo leakInfo)
|
||||
{
|
||||
LOG.info("Connection " + leakInfo.getResourceDescription() + " leaked at:", leakInfo.getStackFrames());
|
||||
LOG.info("Connection {} leaked at:", leakInfo.getResourceDescription(), leakInfo.getStackFrames());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class RequestNotifier
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ public class RequestNotifier
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ public class RequestNotifier
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ public class RequestNotifier
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ public class RequestNotifier
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -224,7 +224,7 @@ public class RequestNotifier
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -254,7 +254,7 @@ public class RequestNotifier
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class ResponseNotifier
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ public class ResponseNotifier
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ public class ResponseNotifier
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ public class ResponseNotifier
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ public class ResponseNotifier
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ public class ResponseNotifier
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,7 +198,7 @@ public class ResponseNotifier
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,7 @@ public class ResponseNotifier
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ public class AppLifeCycle extends Graph
|
|||
for (Binding binding : getBindings(node))
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Calling " + binding.getClass().getName() + " for " + app);
|
||||
LOG.debug("Calling {} for {}", binding.getClass().getName(), app);
|
||||
binding.processBinding(node, app);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -524,7 +524,7 @@ public class DeploymentManager extends ContainerLifeCycle
|
|||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
LOG.warn("Unable to reach node goal: " + nodeName, t);
|
||||
LOG.warn("Unable to reach node goal: {}", nodeName, t);
|
||||
|
||||
// migrate to FAILED node
|
||||
Node failed = _lifecycle.getNodeByName(AppLifeCycle.FAILED);
|
||||
|
|
|
@ -81,7 +81,7 @@ public class GlobalWebappConfigBinding implements AppLifeCycle.Binding
|
|||
|
||||
if (LOG.isDebugEnabled())
|
||||
{
|
||||
LOG.debug("Binding: Configuring webapp context with global settings from: " + _jettyXml);
|
||||
LOG.debug("Binding: Configuring webapp context with global settings from: {}", _jettyXml);
|
||||
}
|
||||
|
||||
if (_jettyXml == null)
|
||||
|
@ -111,7 +111,7 @@ public class GlobalWebappConfigBinding implements AppLifeCycle.Binding
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG.info("Binding: Unable to locate global webapp context settings: " + _jettyXml);
|
||||
LOG.info("Binding: Unable to locate global webapp context settings: {}", _jettyXml);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,18 +123,18 @@ public abstract class ScanningAppProvider extends ContainerLifeCycle implements
|
|||
protected void doStart() throws Exception
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(this.getClass().getSimpleName() + ".doStart()");
|
||||
LOG.debug("{}.doStart()", this.getClass().getSimpleName());
|
||||
if (_monitored.size() == 0)
|
||||
throw new IllegalStateException("No configuration dir specified");
|
||||
|
||||
LOG.info("Deployment monitor " + _monitored + " at interval " + _scanInterval);
|
||||
LOG.info("Deployment monitor {} at interval {}", _monitored, _scanInterval);
|
||||
List<File> files = new ArrayList<>();
|
||||
for (Resource resource : _monitored)
|
||||
{
|
||||
if (resource.exists() && resource.getFile().canRead())
|
||||
files.add(resource.getFile());
|
||||
else
|
||||
LOG.warn("Does not exist: " + resource);
|
||||
LOG.warn("Does not exist: {}", resource);
|
||||
}
|
||||
|
||||
_scanner = new Scanner();
|
||||
|
|
|
@ -163,6 +163,59 @@ Intellectual Property is a hallmark concern of the Eclipse Foundation so you are
|
|||
As much as we would like to accept a tremendous pull request, without the proper chain of events being completed our hands are tied.
|
||||
That being said, the steps are not particularly onerous and we are happy to work with you to get them accomplished.
|
||||
|
||||
==== Logging Conventions
|
||||
|
||||
When deciding when and what to log, bear in mind a few things:
|
||||
|
||||
* never use `LOG.debug` without a preceding `if (LOG.isDebugEnabled())`
|
||||
* we don't want to pollute the log with very long stacktraces unless necessary
|
||||
* we don't want to routinely produce logging events in response to data sent by a user
|
||||
* we should not call more than one LOG method for a single event: otherwise log messages may be interleaved and more confusing
|
||||
* we should never LOG.warn and then throw that exception, as that will result in double handling
|
||||
* we should seldom LOG.debug and then throw as that will make debug verbose and add little information
|
||||
* when interacting with a request, or information received from a client:
|
||||
** no logging unless `isDebugEnabled`, in which case you output at `DEBUG` level eg:
|
||||
[source, java, subs="{sub-order}"]
|
||||
----
|
||||
catch (Throwable t)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Something happened {} {} {}",x, y, z, t);
|
||||
}
|
||||
----
|
||||
|
||||
* when calling into application code that throws an exception:
|
||||
** use `INFO` level, and use `isDebugEnabled` to cut down on the size of the logging of stack traces:
|
||||
[source, java, subs="{sub-order}"]
|
||||
----
|
||||
catch (Throwable t)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.info("Something happened {} {} {}", x, y, z, t);
|
||||
else
|
||||
LOG.info("Something happened {} {} {} {}", x, y, z, t.toString());
|
||||
}
|
||||
----
|
||||
|
||||
* when exceptions happen in jetty code:
|
||||
** mostly use `WARN` or `ERROR` level
|
||||
** if the exception is not entirely unexpected, can happen relatively frequently, or can potentially have a very long stack trace and you don't want to clutter up the log, you can use `isDebugEnabled` to cut down on the size of the logging of the stacktrace:
|
||||
[source, java, subs="{sub-order}"]
|
||||
----
|
||||
catch (Throwable t)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.warn("Something happened {} {} {}", x, y, z, t);
|
||||
else
|
||||
LOG.warn("Something happened {} {} {} {}", x, y, z, t.toString());
|
||||
}
|
||||
----
|
||||
|
||||
____
|
||||
[TIP]
|
||||
Be aware that `LOG.warn("Something happened", t)` is the same as `LOG.warn("Something happened {}", t)`, at least for the default jetty logging.
|
||||
In both cases, the full stacktrace is output. If you only want the log message, you need to do `LOG.warn("Something happened {}", t.toString())`.
|
||||
____
|
||||
|
||||
[[cg-patches]]
|
||||
=== Contributing Patches
|
||||
|
|
|
@ -246,7 +246,7 @@ public class ParamsContentParser extends ContentParser
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Exception while invoking listener " + listener, x);
|
||||
LOG.debug("Exception while invoking listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ public class ParamsContentParser extends ContentParser
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Exception while invoking listener " + listener, x);
|
||||
LOG.debug("Exception while invoking listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ public class ResponseContentParser extends StreamContentParser
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Exception while invoking listener " + listener, x);
|
||||
LOG.debug("Exception while invoking listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,7 @@ public class ResponseContentParser extends StreamContentParser
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Exception while invoking listener " + listener, x);
|
||||
LOG.debug("Exception while invoking listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@ public class ResponseContentParser extends StreamContentParser
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Exception while invoking listener " + listener, x);
|
||||
LOG.debug("Exception while invoking listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ public class ResponseContentParser extends StreamContentParser
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Exception while invoking listener " + listener, x);
|
||||
LOG.debug("Exception while invoking listener {}", listener, x);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ public class ResponseContentParser extends StreamContentParser
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Exception while invoking listener " + listener, x);
|
||||
LOG.debug("Exception while invoking listener {}", listener, x);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ public class ResponseContentParser extends StreamContentParser
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Exception while invoking listener " + listener, x);
|
||||
LOG.debug("Exception while invoking listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ public class StreamContentParser extends ContentParser
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Exception while invoking listener " + listener, x);
|
||||
LOG.debug("Exception while invoking listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ public class StreamContentParser extends ContentParser
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Exception while invoking listener " + listener, x);
|
||||
LOG.debug("Exception while invoking listener {}", listener, x);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -244,7 +244,7 @@ public class HazelcastSessionDataStore
|
|||
|
||||
if (exception.get() != null)
|
||||
{
|
||||
LOG.warn("Error querying for expired sessions {}", exception.get());
|
||||
LOG.warn("Error querying for expired sessions", exception.get());
|
||||
return expiredSessionIds;
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ public class JettyHttpServer extends com.sun.net.httpserver.HttpServer
|
|||
if (connector.getPort() == addr.getPort() || connector.getLocalPort() == addr.getPort())
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("server already bound to port " + addr.getPort() + ", no need to rebind");
|
||||
LOG.debug("server already bound to port {}, no need to rebind", addr.getPort());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ public class JettyHttpServer extends com.sun.net.httpserver.HttpServer
|
|||
throw new IOException("jetty server is not bound to port " + addr.getPort());
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("binding server to port " + addr.getPort());
|
||||
LOG.debug("binding server to port {}", addr.getPort());
|
||||
ServerConnector connector = new ServerConnector(_server);
|
||||
connector.setPort(addr.getPort());
|
||||
connector.setHost(addr.getHostName());
|
||||
|
|
|
@ -164,7 +164,7 @@ public final class HttpCompliance implements ComplianceViolation.Mode
|
|||
Violation section = Violation.valueOf(element);
|
||||
if (section == null)
|
||||
{
|
||||
LOG.warn("Unknown section '" + element + "' in HttpCompliance spec: " + spec);
|
||||
LOG.warn("Unknown section '{}' in HttpCompliance spec: {}", element, spec);
|
||||
continue;
|
||||
}
|
||||
if (exclude)
|
||||
|
|
|
@ -524,7 +524,7 @@ public class HttpParser
|
|||
// count this white space as a header byte to avoid DOS
|
||||
if (_maxHeaderBytes > 0 && ++_headerBytes > _maxHeaderBytes)
|
||||
{
|
||||
LOG.warn("padding is too large >" + _maxHeaderBytes);
|
||||
LOG.warn("padding is too large >{}", _maxHeaderBytes);
|
||||
throw new BadMessageException(HttpStatus.BAD_REQUEST_400);
|
||||
}
|
||||
}
|
||||
|
@ -584,15 +584,15 @@ public class HttpParser
|
|||
{
|
||||
if (_state == State.URI)
|
||||
{
|
||||
LOG.warn("URI is too large >" + _maxHeaderBytes);
|
||||
LOG.warn("URI is too large >{}", _maxHeaderBytes);
|
||||
throw new BadMessageException(HttpStatus.URI_TOO_LONG_414);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_requestHandler != null)
|
||||
LOG.warn("request is too large >" + _maxHeaderBytes);
|
||||
LOG.warn("request is too large >{}", _maxHeaderBytes);
|
||||
else
|
||||
LOG.warn("response is too large >" + _maxHeaderBytes);
|
||||
LOG.warn("response is too large >{}", _maxHeaderBytes);
|
||||
throw new BadMessageException(HttpStatus.REQUEST_HEADER_FIELDS_TOO_LARGE_431);
|
||||
}
|
||||
}
|
||||
|
@ -702,7 +702,7 @@ public class HttpParser
|
|||
|
||||
if (_maxHeaderBytes > 0 && ++_headerBytes > _maxHeaderBytes)
|
||||
{
|
||||
LOG.warn("URI is too large >" + _maxHeaderBytes);
|
||||
LOG.warn("URI is too large >{}", _maxHeaderBytes);
|
||||
throw new BadMessageException(HttpStatus.URI_TOO_LONG_414);
|
||||
}
|
||||
_uri.append(array, p - 1, len + 1);
|
||||
|
@ -1602,7 +1602,7 @@ public class HttpParser
|
|||
protected void badMessage(BadMessageException x)
|
||||
{
|
||||
if (debugEnabled)
|
||||
LOG.debug("Parse exception: " + this + " for " + _handler, x);
|
||||
LOG.debug("Parse exception: {} for {}", this, _handler, x);
|
||||
setState(State.CLOSE);
|
||||
if (_headerComplete)
|
||||
_handler.earlyEOF();
|
||||
|
|
|
@ -68,7 +68,7 @@ public class PreEncodedHttpField extends HttpField
|
|||
if (__encoders[i] == null)
|
||||
__encoders[i] = e;
|
||||
else
|
||||
LOG.warn("multiple PreEncoders for " + e.getHttpVersion());
|
||||
LOG.warn("multiple PreEncoders for {}", e.getHttpVersion());
|
||||
}
|
||||
|
||||
// Always support HTTP1
|
||||
|
|
|
@ -154,7 +154,7 @@ public class HTTP2ClientSession extends HTTP2Session
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -163,7 +163,7 @@ public class HTTP2Connection extends AbstractConnection implements WriteFlusher.
|
|||
catch (IOException x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Could not read from " + endPoint, x);
|
||||
LOG.debug("Could not read from {}", endPoint, x);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ public class HTTP2Connection extends AbstractConnection implements WriteFlusher.
|
|||
if (release() == 0)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Released retained " + this, failure);
|
||||
LOG.debug("Released retained {}", this, failure);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ public class HTTP2Flusher extends IteratingCallback implements Dumpable
|
|||
catch (HpackException.StreamException failure)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Failure generating " + entry, failure);
|
||||
LOG.debug("Failure generating {}", entry, failure);
|
||||
entry.failed(failure);
|
||||
pending.remove();
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ public class HTTP2Flusher extends IteratingCallback implements Dumpable
|
|||
{
|
||||
// Failure to generate the entry is catastrophic.
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Failure generating " + entry, failure);
|
||||
LOG.debug("Failure generating {}", entry, failure);
|
||||
failed(failure);
|
||||
return Action.SUCCEEDED;
|
||||
}
|
||||
|
|
|
@ -1165,7 +1165,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -1178,7 +1178,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1190,7 +1190,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1202,7 +1202,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1214,7 +1214,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1226,7 +1226,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1239,7 +1239,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1254,7 +1254,7 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -708,7 +708,7 @@ public class HTTP2Stream extends IdleTimeout implements IStream, Callback, Dumpa
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -724,7 +724,7 @@ public class HTTP2Stream extends IdleTimeout implements IStream, Callback, Dumpa
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -744,7 +744,7 @@ public class HTTP2Stream extends IdleTimeout implements IStream, Callback, Dumpa
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
callback.failed(x);
|
||||
}
|
||||
}
|
||||
|
@ -766,7 +766,7 @@ public class HTTP2Stream extends IdleTimeout implements IStream, Callback, Dumpa
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
callback.failed(x);
|
||||
}
|
||||
}
|
||||
|
@ -787,7 +787,7 @@ public class HTTP2Stream extends IdleTimeout implements IStream, Callback, Dumpa
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -803,7 +803,7 @@ public class HTTP2Stream extends IdleTimeout implements IStream, Callback, Dumpa
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
callback.failed(x);
|
||||
}
|
||||
}
|
||||
|
@ -824,7 +824,7 @@ public class HTTP2Stream extends IdleTimeout implements IStream, Callback, Dumpa
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ public abstract class BodyParser
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ public abstract class BodyParser
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,7 +133,7 @@ public abstract class BodyParser
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ public abstract class BodyParser
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ public abstract class BodyParser
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ public abstract class BodyParser
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -181,7 +181,7 @@ public abstract class BodyParser
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ public abstract class BodyParser
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -205,7 +205,7 @@ public abstract class BodyParser
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -224,7 +224,7 @@ public abstract class BodyParser
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ public abstract class BodyParser
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -247,7 +247,7 @@ public class Parser
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ public class PrefaceParser
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ public class ServerParser extends Parser
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ public class HpackDecoder
|
|||
// change table size
|
||||
int size = NBitInteger.decode(buffer, 5);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("decode resize=" + size);
|
||||
LOG.debug("decode resize={}", size);
|
||||
if (size > _localMaxDynamicTableSize)
|
||||
throw new IllegalArgumentException();
|
||||
if (emitted)
|
||||
|
|
|
@ -265,9 +265,10 @@ public class HpackEncoder
|
|||
// Check size
|
||||
if (_maxHeaderListSize > 0 && _headerListSize > _maxHeaderListSize)
|
||||
{
|
||||
LOG.warn("Header list size too large {} > {} for {}", _headerListSize, _maxHeaderListSize);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("metadata={}", metadata);
|
||||
LOG.warn("Header list size too large {} > {} metadata={}", _headerListSize, _maxHeaderListSize, metadata);
|
||||
else
|
||||
LOG.warn("Header list size too large {} > {}", _headerListSize, _maxHeaderListSize);
|
||||
}
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
|
|
|
@ -135,7 +135,7 @@ public class HttpSenderOverHTTP2 extends HttpSender
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Could not relativize " + path);
|
||||
LOG.debug("Could not relativize {}", path);
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ public class HTTP2ServerConnection extends HTTP2Connection
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ public class HTTP2ServerSession extends HTTP2Session implements ServerParser.Lis
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,7 +286,7 @@ public class HttpTransportOverHTTP2 implements HttpTransport
|
|||
public void failed(Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Could not push " + request, x);
|
||||
LOG.debug("Could not push {}", request, x);
|
||||
}
|
||||
}, new Stream.Listener.Adapter()); // TODO: handle reset from the client ?
|
||||
}
|
||||
|
|
|
@ -222,7 +222,7 @@ public class InfinispanSessionDataStore extends AbstractSessionDataStore
|
|||
{
|
||||
expired.add(sessionId);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{}- Found expired sessionId=", _context.getWorkerName(), sessionId);
|
||||
LOG.debug("{}- Found expired sessionId={}", _context.getWorkerName(), sessionId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ public abstract class AbstractConnection implements Connection
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ public abstract class AbstractConnection implements Connection
|
|||
if (cause == null)
|
||||
LOG.debug("onClose {}", this);
|
||||
else
|
||||
LOG.debug("onClose " + this, cause);
|
||||
LOG.debug("onClose {}", this, cause);
|
||||
}
|
||||
for (Listener listener : _listeners)
|
||||
{
|
||||
|
@ -248,7 +248,10 @@ public abstract class AbstractConnection implements Connection
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Failure while notifying listener " + listener, x);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.info("Failure while notifying listener {}", listener, x);
|
||||
else
|
||||
LOG.info("Failure while notifying listener {} {}", listener, x.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ public abstract class FillInterest
|
|||
public boolean onFail(Throwable cause)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("onFail " + this, cause);
|
||||
LOG.debug("onFail {}", this, cause);
|
||||
Callback callback = _interested.get();
|
||||
if (callback != null && _interested.compareAndSet(callback, null))
|
||||
{
|
||||
|
|
|
@ -156,6 +156,6 @@ public class LeakTrackingByteBufferPool extends ContainerLifeCycle implements By
|
|||
|
||||
protected void leaked(LeakDetector<ByteBuffer>.LeakInfo leakInfo)
|
||||
{
|
||||
LOG.warn("ByteBuffer " + leakInfo.getResourceDescription() + " leaked at:", leakInfo.getStackFrames());
|
||||
LOG.warn("ByteBuffer {} leaked at: {}", leakInfo.getResourceDescription(), leakInfo.getStackFrames());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -609,9 +609,10 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG.warn(x.toString());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("select() failure", x);
|
||||
LOG.warn("select() failure", x);
|
||||
else
|
||||
LOG.warn("select() failure {}", x.toString());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -865,9 +866,10 @@ public class ManagedSelector extends ContainerLifeCycle implements Dumpable
|
|||
protected void failed(Throwable failure)
|
||||
{
|
||||
IO.close(channel);
|
||||
LOG.warn("Could not accept {}: {}", channel, String.valueOf(failure));
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("", failure);
|
||||
LOG.warn("Could not accept {}", channel, failure);
|
||||
else
|
||||
LOG.warn("Could not accept {}: {}", channel, String.valueOf(failure));
|
||||
_selectorManager.onAcceptFailed(channel, failure);
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ public class NetworkTrafficSocketChannelEndPoint extends SocketChannelEndPoint
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while invoking listener " + listener, x);
|
||||
LOG.info("Exception while invoking listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ public class NetworkTrafficSocketChannelEndPoint extends SocketChannelEndPoint
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while invoking listener " + listener, x);
|
||||
LOG.info("Exception while invoking listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ public class NetworkTrafficSocketChannelEndPoint extends SocketChannelEndPoint
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while invoking listener " + listener, x);
|
||||
LOG.info("Exception while invoking listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ public class NetworkTrafficSocketChannelEndPoint extends SocketChannelEndPoint
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while invoking listener " + listener, x);
|
||||
LOG.info("Exception while invoking listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -314,9 +314,9 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump
|
|||
catch (Throwable x)
|
||||
{
|
||||
if (isRunning())
|
||||
LOG.warn("Exception while notifying connection " + connection, x);
|
||||
LOG.warn("Exception while notifying connection {}", connection, x);
|
||||
else
|
||||
LOG.debug("Exception while notifying connection " + connection, x);
|
||||
LOG.debug("Exception while notifying connection {}", connection, x);
|
||||
throw x;
|
||||
}
|
||||
}
|
||||
|
@ -335,7 +335,8 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.debug("Exception while notifying connection " + connection, x);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Exception while notifying connection {}", connection, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -495,7 +495,7 @@ public abstract class WriteFlusher
|
|||
|
||||
case PENDING:
|
||||
if (DEBUG)
|
||||
LOG.debug("failed: " + this, cause);
|
||||
LOG.debug("failed: {}", this, cause);
|
||||
|
||||
PendingState pending = (PendingState)current;
|
||||
if (updateState(pending, new FailedState(cause)))
|
||||
|
@ -508,7 +508,7 @@ public abstract class WriteFlusher
|
|||
case WRITING:
|
||||
case COMPLETING:
|
||||
if (DEBUG)
|
||||
LOG.debug("failed: " + this, cause);
|
||||
LOG.debug("failed: {}", this, cause);
|
||||
if (updateState(current, new FailedState(cause)))
|
||||
return true;
|
||||
break;
|
||||
|
|
|
@ -1394,7 +1394,7 @@ public class SslConnection extends AbstractConnection implements Connection.Upgr
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1412,7 +1412,7 @@ public class SslConnection extends AbstractConnection implements Connection.Upgr
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.info("Exception while notifying listener " + listener, x);
|
||||
LOG.info("Exception while notifying listener {}", listener, x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1463,13 +1463,13 @@ public class SslConnection extends AbstractConnection implements Connection.Upgr
|
|||
{
|
||||
_failure = x;
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(this + " stored " + context + " exception", x);
|
||||
LOG.debug("{} stored {} exception", this, context, x);
|
||||
}
|
||||
else if (x != _failure)
|
||||
{
|
||||
_failure.addSuppressed(x);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(this + " suppressed " + context + " exception", x);
|
||||
LOG.debug("{} suppressed {} exception", this, context, x);
|
||||
}
|
||||
return _failure;
|
||||
}
|
||||
|
|
|
@ -157,8 +157,6 @@ public abstract class AbstractDatabaseLoginModule extends AbstractLoginModule
|
|||
rolesQuery = "select " + dbUserRoleTableRoleField + " from " + dbUserRoleTable + " where " + dbUserRoleTableUserField + "=?";
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("userQuery = " + userQuery);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("rolesQuery = " + rolesQuery);
|
||||
LOG.debug("userQuery = {} rolesQuery = {}", userQuery, rolesQuery);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class JDBCLoginModule extends AbstractDatabaseLoginModule
|
|||
throw new IllegalStateException("Database connection information not configured");
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Connecting using dbDriver=" + dbDriver + "+ dbUserName=" + dbUserName + ", dbPassword=" + dbUrl);
|
||||
LOG.debug("Connecting using dbDriver={} dbUserName={}, dbPassword={}", dbDriver, dbUserName, dbUrl);
|
||||
|
||||
return DriverManager.getConnection(dbUrl,
|
||||
dbUserName,
|
||||
|
|
|
@ -289,12 +289,12 @@ public class LdapLoginModule extends AbstractLoginModule
|
|||
}
|
||||
catch (NamingException e)
|
||||
{
|
||||
LOG.debug("no password available under attribute: " + _userPasswordAttribute);
|
||||
LOG.debug("no password available under attribute: {}", _userPasswordAttribute);
|
||||
}
|
||||
}
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("user cred is: " + ldapCredential);
|
||||
LOG.debug("user cred is: {}", ldapCredential);
|
||||
|
||||
return ldapCredential;
|
||||
}
|
||||
|
@ -350,7 +350,7 @@ public class LdapLoginModule extends AbstractLoginModule
|
|||
NamingEnumeration<SearchResult> results = dirContext.search(_roleBaseDn, filter, filterArguments, ctls);
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Found user roles?: " + results.hasMoreElements());
|
||||
LOG.debug("Found user roles?: {}", results.hasMoreElements());
|
||||
|
||||
while (results.hasMoreElements())
|
||||
{
|
||||
|
@ -501,7 +501,7 @@ public class LdapLoginModule extends AbstractLoginModule
|
|||
|
||||
String userDn = searchResult.getNameInNamespace();
|
||||
|
||||
LOG.info("Attempting authentication: " + userDn);
|
||||
LOG.info("Attempting authentication: {}", userDn);
|
||||
|
||||
Hashtable<Object, Object> environment = getEnvironment();
|
||||
|
||||
|
@ -543,7 +543,7 @@ public class LdapLoginModule extends AbstractLoginModule
|
|||
String filter = "(&(objectClass={0})({1}={2}))";
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Searching for user " + username + " with filter: \'" + filter + "\'" + " from base dn: " + _userBaseDn);
|
||||
LOG.debug("Searching for user {} with filter: \'{}\' from base dn: {}", username, filter, _userBaseDn);
|
||||
|
||||
Object[] filterArguments = new Object[]{
|
||||
_userObjectClass,
|
||||
|
@ -571,7 +571,7 @@ public class LdapLoginModule extends AbstractLoginModule
|
|||
}
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Found user?: " + results.hasMoreElements());
|
||||
LOG.debug("Found user?: {}", results.hasMoreElements());
|
||||
|
||||
if (!results.hasMoreElements())
|
||||
throw new FailedLoginException("User not found.");
|
||||
|
|
|
@ -76,7 +76,7 @@ public class PropertyFileLoginModule extends AbstractLoginModule
|
|||
PropertyUserStore prev = _propertyUserStores.putIfAbsent(_filename, propertyUserStore);
|
||||
if (prev == null)
|
||||
{
|
||||
LOG.debug("setupPropertyUserStore: Starting new PropertyUserStore. PropertiesFile: " + _filename + " refreshInterval: " + _refreshInterval);
|
||||
LOG.debug("setupPropertyUserStore: Starting new PropertyUserStore. PropertiesFile: {} refreshInterval: {}", _filename, _refreshInterval);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -109,7 +109,8 @@ public class PropertyFileLoginModule extends AbstractLoginModule
|
|||
if (propertyUserStore == null)
|
||||
throw new IllegalStateException("PropertyUserStore should never be null here!");
|
||||
|
||||
LOG.debug("Checking PropertyUserStore " + _filename + " for " + userName);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Checking PropertyUserStore {} for {}", _filename, userName);
|
||||
UserIdentity userIdentity = propertyUserStore.getUserIdentity(userName);
|
||||
if (userIdentity == null)
|
||||
return null;
|
||||
|
@ -123,7 +124,8 @@ public class PropertyFileLoginModule extends AbstractLoginModule
|
|||
.collect(Collectors.toList());
|
||||
|
||||
Credential credential = (Credential)userIdentity.getSubject().getPrivateCredentials().iterator().next();
|
||||
LOG.debug("Found: " + userName + " in PropertyUserStore " + _filename);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Found: {} in PropertyUserStore {}", userName, _filename);
|
||||
return new UserInfo(userName, credential, roles);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public class BasicAuthModule extends BaseAuthModule
|
|||
if (credentials != null)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Credentials: " + credentials);
|
||||
LOG.debug("Credentials: {}", credentials);
|
||||
if (login(clientSubject, credentials, Constraint.__BASIC_AUTH, messageInfo))
|
||||
{
|
||||
return AuthStatus.SUCCESS;
|
||||
|
|
|
@ -398,7 +398,7 @@ public class MBeanContainer implements Container.InheritedListener, Dumpable, De
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.warn("bean: " + obj, x);
|
||||
LOG.warn("bean: {}", obj, x);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ public class InitialContextFactory implements javax.naming.spi.InitialContextFac
|
|||
|
||||
Context ctx = new localContextRoot(env);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Created initial context delegate for local namespace:" + ctx);
|
||||
LOG.debug("Created initial context delegate for local namespace:{}", ctx);
|
||||
|
||||
return ctx;
|
||||
}
|
||||
|
|
|
@ -290,7 +290,7 @@ public class NamingContext implements Context, Dumpable
|
|||
else
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Checking for existing binding for name=" + cname + " for first element of name=" + cname.get(0));
|
||||
LOG.debug("Checking for existing binding for name={} for first element of name={}", cname, cname.get(0));
|
||||
|
||||
//walk down the subcontext hierarchy
|
||||
//need to ignore trailing empty "" name components
|
||||
|
@ -431,7 +431,7 @@ public class NamingContext implements Context, Dumpable
|
|||
throws NamingException
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Looking up name=\"" + name + "\"");
|
||||
LOG.debug("Looking up name=\"{}\"", name);
|
||||
Name cname = toCanonicalName(name);
|
||||
|
||||
if ((cname == null) || (cname.size() == 0))
|
||||
|
@ -564,7 +564,7 @@ public class NamingContext implements Context, Dumpable
|
|||
throws NamingException
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("list() on Context=" + getName() + " for name=" + name);
|
||||
LOG.debug("list() on Context={} for name={}", getName(), name);
|
||||
Name cname = toCanonicalName(name);
|
||||
|
||||
if (cname == null)
|
||||
|
@ -962,7 +962,7 @@ public class NamingContext implements Context, Dumpable
|
|||
}
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Adding binding with key=" + key + " obj=" + obj + " for context=" + _name + " as " + binding);
|
||||
LOG.debug("Adding binding with key={} obj={} for context={} as {}", key, obj, _name, binding);
|
||||
|
||||
if (binding != null)
|
||||
{
|
||||
|
@ -1006,7 +1006,7 @@ public class NamingContext implements Context, Dumpable
|
|||
{
|
||||
String key = name.toString();
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Removing binding with key=" + key);
|
||||
LOG.debug("Removing binding with key={}", key);
|
||||
Binding binding = _bindings.remove(key);
|
||||
if (binding != null)
|
||||
{
|
||||
|
|
|
@ -66,19 +66,19 @@ public class NamingUtil
|
|||
{
|
||||
subCtx = (Context)subCtx.lookup(name.get(i));
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Subcontext " + name.get(i) + " already exists");
|
||||
LOG.debug("Subcontext {} already exists", name.get(i));
|
||||
}
|
||||
catch (NameNotFoundException e)
|
||||
{
|
||||
subCtx = subCtx.createSubcontext(name.get(i));
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Subcontext " + name.get(i) + " created");
|
||||
LOG.debug("Subcontext {} created", name.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
subCtx.rebind(name.get(name.size() - 1), obj);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Bound object to " + name.get(name.size() - 1));
|
||||
LOG.debug("Bound object to {}", name.get(name.size() - 1));
|
||||
return subCtx;
|
||||
}
|
||||
|
||||
|
|
|
@ -304,7 +304,7 @@ public class javaRootURLContext implements Context
|
|||
String head = name.get(0);
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Head element of name is: " + head);
|
||||
LOG.debug("Head element of name is: {}", head);
|
||||
|
||||
if (head.startsWith(URL_PREFIX))
|
||||
{
|
||||
|
@ -314,7 +314,7 @@ public class javaRootURLContext implements Context
|
|||
name.add(0, head);
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("name modified to " + name.toString());
|
||||
LOG.debug("name modified to {}", name.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ public class javaURLContextFactory implements ObjectFactory
|
|||
if (url instanceof String)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(">>> resolution of url " + url + " requested");
|
||||
LOG.debug(">>> resolution of url {} requested", url);
|
||||
Context rootctx = new javaRootURLContext(env);
|
||||
return rootctx.lookup((String)url);
|
||||
}
|
||||
|
|
|
@ -275,7 +275,7 @@ public class localContextRoot implements Context
|
|||
public Object lookup(Name name) throws NamingException
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Looking up name=\"" + name + "\"");
|
||||
LOG.debug("Looking up name=\"{}\\\"", name);
|
||||
Name cname = __root.toCanonicalName(name);
|
||||
|
||||
if ((cname == null) || cname.isEmpty())
|
||||
|
@ -380,7 +380,7 @@ public class localContextRoot implements Context
|
|||
else
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Checking for existing binding for name=" + cname + " for first element of name=" + cname.get(0));
|
||||
LOG.debug("Checking for existing binding for name={} for first element of name={}", cname, cname.get(0));
|
||||
|
||||
getContext(cname).bind(cname.getSuffix(1), obj);
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ public class localContextRoot implements Context
|
|||
{
|
||||
//walk down the subcontext hierarchy
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Checking for existing binding for name=" + cname + " for first element of name=" + cname.get(0));
|
||||
LOG.debug("Checking for existing binding for name={} for first element of name={}", cname, cname.get(0));
|
||||
|
||||
getContext(cname).rebind(cname.getSuffix(1), obj);
|
||||
}
|
||||
|
|
|
@ -144,12 +144,12 @@ public class SelectiveJarResource extends JarResource
|
|||
{
|
||||
String entryName = entry.getName();
|
||||
|
||||
LOG.debug("Looking at " + entryName);
|
||||
LOG.debug("Looking at {}", entryName);
|
||||
String dotCheck = StringUtil.replace(entryName, '\\', '/');
|
||||
dotCheck = URIUtil.canonicalPath(dotCheck);
|
||||
if (dotCheck == null)
|
||||
{
|
||||
LOG.info("Invalid entry: " + entryName);
|
||||
LOG.info("Invalid entry: {}", entryName);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -269,7 +269,7 @@ public class MongoSessionDataStore extends NoSqlSessionDataStore
|
|||
public boolean delete(String id) throws Exception
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Remove:session {} for context ", id, _context);
|
||||
LOG.debug("Remove:session {} for context {}", id, _context);
|
||||
|
||||
/*
|
||||
* Check if the session exists and if it does remove the context
|
||||
|
@ -407,7 +407,7 @@ public class MongoSessionDataStore extends NoSqlSessionDataStore
|
|||
{
|
||||
String id = (String)session.get(__ID);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("{} Mongo found old expired session {}", _context, id + " exp=" + session.get(__EXPIRY));
|
||||
LOG.debug("{} Mongo found old expired session {} exp={}", _context, id, session.get(__EXPIRY));
|
||||
expiredSessions.add(id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -143,7 +143,8 @@ public abstract class AbstractContextProvider extends AbstractLifeCycle implemen
|
|||
{
|
||||
ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
|
||||
LOG.debug("Context classloader = " + cl);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Context classloader = {}", cl);
|
||||
try
|
||||
{
|
||||
Thread.currentThread().setContextClassLoader(classLoader);
|
||||
|
|
|
@ -258,7 +258,7 @@ public abstract class AbstractWebAppProvider extends AbstractLifeCycle implement
|
|||
if (defaultWebXml.exists())
|
||||
_webApp.setDefaultsDescriptor(defaultWebXml.getAbsolutePath());
|
||||
else
|
||||
LOG.warn(defaultWebXml.getAbsolutePath() + " does not exist");
|
||||
LOG.warn("{} does not exist", defaultWebXml.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -340,7 +340,8 @@ public abstract class AbstractWebAppProvider extends AbstractLifeCycle implement
|
|||
if (paths.length() > 0)
|
||||
paths.append(", ");
|
||||
paths.append(f.toURI().toURL().toString());
|
||||
LOG.debug("getPathsToRequiredBundles: bundle path=" + bs[0].getLocation() + " uri=" + f.toURI());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("getPathsToRequiredBundles: bundle path={} uri={}", bs[0].getLocation(), f.toURI());
|
||||
}
|
||||
|
||||
return paths.toString();
|
||||
|
@ -355,7 +356,8 @@ public abstract class AbstractWebAppProvider extends AbstractLifeCycle implement
|
|||
return;
|
||||
|
||||
ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
LOG.debug("Context classloader = " + cl);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Context classloader = {}", cl);
|
||||
try
|
||||
{
|
||||
|
||||
|
@ -399,7 +401,7 @@ public abstract class AbstractWebAppProvider extends AbstractLifeCycle implement
|
|||
return;
|
||||
|
||||
// Apply it just as the standard jetty ContextProvider would do
|
||||
LOG.info("Applying " + contextXmlUri + " to " + _webApp);
|
||||
LOG.info("Applying {} to {}", contextXmlUri, _webApp);
|
||||
|
||||
XmlConfiguration xmlConfiguration = new XmlConfiguration(Resource.newResource(contextXmlUri));
|
||||
WebAppClassLoader.runWithServerClassAccess(() ->
|
||||
|
|
|
@ -116,7 +116,7 @@ public class DefaultJettyAtJettyHomeHelper
|
|||
jettyHomeDir = new File(jettyHomeSysProp);
|
||||
if (!jettyHomeDir.exists() || !jettyHomeDir.isDirectory())
|
||||
{
|
||||
LOG.warn("Unable to locate the jetty.home folder " + jettyHomeSysProp);
|
||||
LOG.warn("Unable to locate the jetty.home folder {}", jettyHomeSysProp);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ public class DefaultJettyAtJettyHomeHelper
|
|||
}
|
||||
if (jettyHomeBundle == null)
|
||||
{
|
||||
LOG.warn("Unable to find the jetty.home.bundle named " + jettyHomeSysProp);
|
||||
LOG.warn("Unable to find the jetty.home.bundle named {}", jettyHomeSysProp);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -158,8 +158,7 @@ public class DefaultJettyAtJettyHomeHelper
|
|||
String base = (String)properties.get(OSGiServerConstants.JETTY_BASE);
|
||||
if (base == null)
|
||||
base = home;
|
||||
LOG.info("JETTY.HOME=" + home);
|
||||
LOG.info("JETTY.BASE=" + base);
|
||||
LOG.info("JETTY.HOME={} JETTY.BASE={}", home, base);
|
||||
ClassLoader contextCl = Thread.currentThread().getContextClassLoader();
|
||||
try
|
||||
{
|
||||
|
|
|
@ -162,7 +162,7 @@ public class ServerInstanceWrapper
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOG.warn("Configuration error in " + jettyConfiguration);
|
||||
LOG.warn("Configuration error in {}", jettyConfiguration);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ public class ServerInstanceWrapper
|
|||
ClassLoader libExtClassLoader = LibExtClassLoaderHelper.createLibExtClassLoader(null, sharedURLs, JettyBootstrapActivator.class.getClassLoader());
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("LibExtClassLoader = " + libExtClassLoader);
|
||||
LOG.debug("LibExtClassLoader = {}", libExtClassLoader);
|
||||
|
||||
Thread.currentThread().setContextClassLoader(libExtClassLoader);
|
||||
|
||||
|
@ -264,7 +264,7 @@ public class ServerInstanceWrapper
|
|||
_commonParentClassLoaderForWebapps = libExtClassLoader;
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("common classloader = " + _commonParentClassLoaderForWebapps);
|
||||
LOG.debug("common classloader = {}", _commonParentClassLoaderForWebapps);
|
||||
|
||||
server.start();
|
||||
}
|
||||
|
@ -433,7 +433,7 @@ public class ServerInstanceWrapper
|
|||
else
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Unrecognized Jetty Shared Lib URL: " + url);
|
||||
LOG.debug("Unrecognized Jetty Shared Lib URL: {}", url);
|
||||
}
|
||||
}
|
||||
catch (Throwable mfe)
|
||||
|
|
|
@ -216,7 +216,7 @@ public class OSGiWebappClassLoader extends WebAppClassLoader implements BundleRe
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG.info("Did not add " + path + " to the classloader of the webapp " + getContext());
|
||||
LOG.info("Did not add {} to the classloader of the webapp {}", path, getContext());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ public class OSGiClassLoader extends URLClassLoader
|
|||
if (url == null && name.startsWith("/"))
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("HACK leading / off " + name);
|
||||
LOG.debug("HACK leading / off {}", name);
|
||||
|
||||
url = _osgiBundleClassLoader.getResource(name.substring(1));
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ public class OSGiClassLoader extends URLClassLoader
|
|||
|
||||
if (url != null)
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("getResource(" + name + ")=" + url);
|
||||
LOG.debug("getResource({})={}", name, url);
|
||||
|
||||
return url;
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ public class OSGiClassLoader extends URLClassLoader
|
|||
resolveClass(c);
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("loaded " + c + " from " + c.getClassLoader());
|
||||
LOG.debug("loaded {} from {}", c, c.getClassLoader());
|
||||
|
||||
return c;
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ public class DefaultBundleClassLoaderHelper implements BundleClassLoaderHelper
|
|||
|
||||
default:
|
||||
{
|
||||
LOG.warn("No classloader found for bundle " + bundle.getSymbolicName());
|
||||
LOG.warn("No classloader found for bundle {}", bundle.getSymbolicName());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ public class DefaultBundleClassLoaderHelper implements BundleClassLoaderHelper
|
|||
}
|
||||
}
|
||||
|
||||
LOG.warn("No classloader for equinox platform for bundle " + bundle.getSymbolicName());
|
||||
LOG.warn("No classloader for equinox platform for bundle {}", bundle.getSymbolicName());
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -376,7 +376,7 @@ public class DefaultBundleClassLoaderHelper implements BundleClassLoaderHelper
|
|||
}
|
||||
}
|
||||
|
||||
LOG.warn("No classloader for felix platform for bundle " + bundle.getSymbolicName());
|
||||
LOG.warn("No classloader for felix platform for bundle {}", bundle.getSymbolicName());
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -427,7 +427,7 @@ public class DefaultBundleClassLoaderHelper implements BundleClassLoaderHelper
|
|||
}
|
||||
}
|
||||
|
||||
LOG.warn("No classloader for Concierge platform for bundle " + bundle.getSymbolicName());
|
||||
LOG.warn("No classloader for Concierge platform for bundle {}", bundle.getSymbolicName());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ public class Injection
|
|||
try
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Looking for method for setter: " + setter + " with arg {}", _resourceClass);
|
||||
LOG.debug("Looking for method for setter: {} with arg {}", setter, _resourceClass);
|
||||
tmpTarget = IntrospectionUtil.findMethod(clazz, setter, new Class[]{_resourceClass}, true, false);
|
||||
tmpParamClass = _resourceClass;
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ public class PreDestroyCallback extends LifeCycleCallback
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOG.warn("Ignoring exception thrown on preDestroy call to " + getTargetClass() + "." + getTarget().getName(), e);
|
||||
LOG.warn("Ignoring exception thrown on preDestroy call to {}.{}", getTargetClass(), getTarget().getName(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ public abstract class NamingEntry
|
|||
InitialContext ic = new InitialContext();
|
||||
Context env = (Context)ic.lookup("java:comp/env");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Binding java:comp/env/" + localName + " to " + _objectNameString);
|
||||
LOG.debug("Binding java:comp/env/{} to {}", localName, _objectNameString);
|
||||
NamingUtil.bind(env, localName, new LinkRef(_objectNameString));
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ public abstract class NamingEntry
|
|||
InitialContext ic = new InitialContext();
|
||||
Context env = (Context)ic.lookup("java:comp/env");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Unbinding java:comp/env/" + getJndiName());
|
||||
LOG.debug("Unbinding java:comp/env/{}", getJndiName());
|
||||
env.unbind(getJndiName());
|
||||
}
|
||||
catch (NamingException e)
|
||||
|
|
|
@ -151,7 +151,7 @@ public class NamingEntryUtil
|
|||
catch (NameNotFoundException e)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("No entries of type " + clazz.getName() + " in context=" + context);
|
||||
LOG.debug("No entries of type {} in context={}", clazz.getName(), context);
|
||||
}
|
||||
|
||||
return list;
|
||||
|
|
|
@ -75,7 +75,7 @@ public class Transaction extends NamingEntry
|
|||
InitialContext ic = new InitialContext();
|
||||
Context env = (Context)ic.lookup("java:comp/env");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Binding java:comp/env" + getJndiName() + " to " + _objectNameString);
|
||||
LOG.debug("Binding java:comp/env{} to {}", getJndiName(), _objectNameString);
|
||||
NamingUtil.bind(env, localName, new LinkRef(_objectNameString));
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ public class Transaction extends NamingEntry
|
|||
InitialContext ic = new InitialContext();
|
||||
Context env = (Context)ic.lookup("java:comp");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Binding java:comp/" + getJndiName() + " to " + _objectNameString);
|
||||
LOG.debug("Binding java:comp/{} to {}", getJndiName(), _objectNameString);
|
||||
NamingUtil.bind(env, getJndiName(), new LinkRef(_objectNameString));
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ public class Transaction extends NamingEntry
|
|||
InitialContext ic = new InitialContext();
|
||||
Context env = (Context)ic.lookup("java:comp");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Unbinding java:comp/" + getJndiName());
|
||||
LOG.debug("Unbinding java:comp/{}", getJndiName());
|
||||
env.unbind(getJndiName());
|
||||
}
|
||||
catch (NamingException e)
|
||||
|
|
|
@ -254,11 +254,11 @@ public class DataSourceLoginService extends AbstractLoginService
|
|||
}
|
||||
catch (NamingException e)
|
||||
{
|
||||
LOG.warn("No datasource for " + _jndiName, e);
|
||||
LOG.warn("No datasource for {}", _jndiName, e);
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
LOG.warn("Problem loading user info for " + username, e);
|
||||
LOG.warn("Problem loading user info for {}", username, e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -290,11 +290,11 @@ public class DataSourceLoginService extends AbstractLoginService
|
|||
}
|
||||
catch (NamingException e)
|
||||
{
|
||||
LOG.warn("No datasource for " + _jndiName, e);
|
||||
LOG.warn("No datasource for {}", _jndiName, e);
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
LOG.warn("Problem loading user info for " + user.getName(), e);
|
||||
LOG.warn("Problem loading user info for {}", user.getName(), e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -382,7 +382,7 @@ public class DataSourceLoginService extends AbstractLoginService
|
|||
_userTableUserField + " varchar(100) not null unique," +
|
||||
_userTablePasswordField + " varchar(20) not null, primary key(" + _userTableKey + "))");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Created table " + _userTableName);
|
||||
LOG.debug("Created table {}", _userTableName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -400,7 +400,7 @@ public class DataSourceLoginService extends AbstractLoginService
|
|||
_roleTableRoleField + " varchar(100) not null unique, primary key(" + _roleTableKey + "))";
|
||||
stmt.executeUpdate(str);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Created table " + _roleTableName);
|
||||
LOG.debug("Created table {}", _roleTableName);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -422,7 +422,7 @@ public class DataSourceLoginService extends AbstractLoginService
|
|||
"primary key (" + _userRoleTableUserKey + ", " + _userRoleTableRoleKey + "))");
|
||||
stmt.executeUpdate("create index indx_user_role on " + _userRoleTableName + "(" + _userRoleTableUserKey + ")");
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Created table " + _userRoleTableName + " and index");
|
||||
LOG.debug("Created table {} and index", _userRoleTableName);
|
||||
}
|
||||
}
|
||||
connection.commit();
|
||||
|
|
|
@ -87,7 +87,7 @@ public class EnvConfiguration extends AbstractConfiguration
|
|||
public void configure(WebAppContext context) throws Exception
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Created java:comp/env for webapp " + context.getContextPath());
|
||||
LOG.debug("Created java:comp/env for webapp {}", context.getContextPath());
|
||||
|
||||
//check to see if an explicit file has been set, if not,
|
||||
//look in WEB-INF/jetty-env.xml
|
||||
|
@ -219,7 +219,7 @@ public class EnvConfiguration extends AbstractConfiguration
|
|||
}
|
||||
catch (NamingException e)
|
||||
{
|
||||
LOG.debug("Error unbinding jndi entries scoped to webapp " + context, e);
|
||||
LOG.debug("Error unbinding jndi entries scoped to webapp {}", context, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ public class PlusDecorator implements Decorator
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOG.warn("Destroying instance of " + o.getClass(), e);
|
||||
LOG.warn("Destroying instance of {}", o.getClass(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -545,7 +545,7 @@ public class PlusDescriptorProcessor extends IterativeDescriptorProcessor
|
|||
}
|
||||
if (methodName == null || methodName.equals(""))
|
||||
{
|
||||
LOG.warn("No lifecycle-callback-method specified for class " + className);
|
||||
LOG.warn("No lifecycle-callback-method specified for class {}", className);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -579,7 +579,7 @@ public class PlusDescriptorProcessor extends IterativeDescriptorProcessor
|
|||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
LOG.warn("Couldn't load post-construct target class " + className);
|
||||
LOG.warn("Couldn't load post-construct target class {}", className);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -595,7 +595,7 @@ public class PlusDescriptorProcessor extends IterativeDescriptorProcessor
|
|||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
LOG.warn("Couldn't load post-construct target class " + className);
|
||||
LOG.warn("Couldn't load post-construct target class {}", className);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -623,7 +623,7 @@ public class PlusDescriptorProcessor extends IterativeDescriptorProcessor
|
|||
}
|
||||
if (methodName == null || methodName.equals(""))
|
||||
{
|
||||
LOG.warn("No lifecycle-callback-method specified for pre-destroy class " + className);
|
||||
LOG.warn("No lifecycle-callback-method specified for pre-destroy class {}", className);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -657,7 +657,7 @@ public class PlusDescriptorProcessor extends IterativeDescriptorProcessor
|
|||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
LOG.warn("Couldn't load pre-destroy target class " + className);
|
||||
LOG.warn("Couldn't load pre-destroy target class {}", className);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -673,7 +673,7 @@ public class PlusDescriptorProcessor extends IterativeDescriptorProcessor
|
|||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
LOG.warn("Couldn't load pre-destroy target class " + className);
|
||||
LOG.warn("Couldn't load pre-destroy target class {}", className);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -735,7 +735,7 @@ public class PlusDescriptorProcessor extends IterativeDescriptorProcessor
|
|||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
LOG.warn("Couldn't load injection target class " + targetClassName);
|
||||
LOG.warn("Couldn't load injection target class {}", targetClassName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -647,7 +647,7 @@ public class ConnectHandler extends HandlerWrapper
|
|||
{
|
||||
buffer = null;
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(this + " failed to write initial " + remaining + " bytes to server", x);
|
||||
LOG.debug("{} failed to write initial {} bytes to server", this, remaining, x);
|
||||
close();
|
||||
getConnection().close();
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ public abstract class ProxyConnection extends AbstractConnection
|
|||
catch (IOException x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(ProxyConnection.this + " could not fill", x);
|
||||
LOG.debug("{} could not fill", ProxyConnection.this, x);
|
||||
bufferPool.release(buffer);
|
||||
disconnect(x);
|
||||
return Action.SUCCEEDED;
|
||||
|
@ -151,7 +151,7 @@ public abstract class ProxyConnection extends AbstractConnection
|
|||
protected void onCompleteFailure(Throwable x)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(ProxyConnection.this + " failed to write " + filled + " bytes", x);
|
||||
LOG.debug("{} failed to write {} bytes", ProxyConnection.this, filled, x);
|
||||
bufferPool.release(buffer);
|
||||
disconnect(x);
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@ public class ProxyServletLoadTest
|
|||
|
||||
if (response.getStatus() != 200)
|
||||
{
|
||||
LOG.warn("Got response <{}>, expecting <{}> iteration=", response.getStatus(), 200, iterations);
|
||||
LOG.warn("Got response <{}>, expecting <{}> iteration={}", response.getStatus(), 200, iterations);
|
||||
// allow all ClientLoops to finish
|
||||
success.set(false);
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ public class ProxyServletLoadTest
|
|||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.warn("Error processing request " + iterations, x);
|
||||
LOG.warn("Error processing request {}", iterations, x);
|
||||
success.set(false);
|
||||
}
|
||||
finally
|
||||
|
|
|
@ -763,7 +763,7 @@ public class QuickStartGeneratorConfiguration extends AbstractConfiguration
|
|||
return Collections.emptyMap();
|
||||
OriginInfo origin = md.getOriginInfo(name);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("origin of " + name + " is " + origin);
|
||||
LOG.debug("origin of {} is {}", name, origin);
|
||||
if (origin == null)
|
||||
return Collections.emptyMap();
|
||||
return Collections.singletonMap(_originAttribute, origin.toString() + ":" + (_count++));
|
||||
|
@ -788,7 +788,7 @@ public class QuickStartGeneratorConfiguration extends AbstractConfiguration
|
|||
generateQuickStartWebXml(context, fos);
|
||||
LOG.info("Generated {}", _quickStartWebXml);
|
||||
if (context.getAttribute(WebInfConfiguration.TEMPORARY_RESOURCE_BASE) != null && !context.isPersistTempDirectory())
|
||||
LOG.warn("Generated to non persistent location: " + _quickStartWebXml);
|
||||
LOG.warn("Generated to non persistent location: {}", _quickStartWebXml);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ public class Runner
|
|||
case "--out":
|
||||
String outFile = args[++i];
|
||||
PrintStream out = new PrintStream(new RolloverFileOutputStream(outFile, true, -1));
|
||||
LOG.info("Redirecting stderr/stdout to " + outFile);
|
||||
LOG.info("Redirecting stderr/stdout to {}", outFile);
|
||||
System.setErr(out);
|
||||
System.setOut(out);
|
||||
break;
|
||||
|
|
|
@ -159,7 +159,7 @@ public class HashLoginService extends AbstractLoginService
|
|||
if (_userStore == null)
|
||||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("doStart: Starting new PropertyUserStore. PropertiesFile: " + _config + " hotReload: " + hotReload);
|
||||
LOG.debug("doStart: Starting new PropertyUserStore. PropertiesFile: {} hotReload: {}", _config, hotReload);
|
||||
PropertyUserStore propertyUserStore = new PropertyUserStore();
|
||||
propertyUserStore.setHotReload(hotReload);
|
||||
propertyUserStore.setConfig(_config);
|
||||
|
|
|
@ -140,7 +140,7 @@ public class JDBCLoginService extends AbstractLoginService
|
|||
_userName == null || _userName.equals("") ||
|
||||
_password == null)
|
||||
{
|
||||
LOG.warn("UserRealm " + getName() + " has not been properly configured");
|
||||
LOG.warn("UserRealm {} has not been properly configured", getName());
|
||||
}
|
||||
|
||||
_userSql = "select " + _userTableKey + "," + _userTablePasswordField + " from " + userTable + " where " + userTableUserField + " = ?";
|
||||
|
@ -180,13 +180,9 @@ public class JDBCLoginService extends AbstractLoginService
|
|||
Class.forName(_jdbcDriver);
|
||||
_con = DriverManager.getConnection(_url, _userName, _password);
|
||||
}
|
||||
catch (SQLException e)
|
||||
catch (Exception e)
|
||||
{
|
||||
LOG.warn("UserRealm " + getName() + " could not connect to database; will try later", e);
|
||||
}
|
||||
catch (ClassNotFoundException e)
|
||||
{
|
||||
LOG.warn("UserRealm " + getName() + " could not connect to database; will try later", e);
|
||||
LOG.warn("UserRealm {} could not connect to database; will try later", getName(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -218,7 +214,7 @@ public class JDBCLoginService extends AbstractLoginService
|
|||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
LOG.warn("UserRealm " + getName() + " could not load user information from database", e);
|
||||
LOG.warn("UserRealm {} could not load user information from database", getName(), e);
|
||||
closeConnection();
|
||||
}
|
||||
|
||||
|
@ -255,7 +251,7 @@ public class JDBCLoginService extends AbstractLoginService
|
|||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
LOG.warn("UserRealm " + getName() + " could not load user information from database", e);
|
||||
LOG.warn("UserRealm {} could not load user information from database", getName(), e);
|
||||
closeConnection();
|
||||
}
|
||||
|
||||
|
|
|
@ -269,7 +269,7 @@ public class PropertyUserStore extends UserStore implements PathWatcher.Listener
|
|||
_firstLoad = false;
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Loaded " + this + " from " + _configPath);
|
||||
LOG.debug("Loaded {} from {}", this, _configPath);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -396,7 +396,7 @@ public abstract class SecurityHandler extends HandlerWrapper implements Authenti
|
|||
_authenticator.setConfiguration(this);
|
||||
else if (_realmName != null)
|
||||
{
|
||||
LOG.warn("No Authenticator for " + this);
|
||||
LOG.warn("No Authenticator for {}", this);
|
||||
throw new IllegalStateException("No Authenticator");
|
||||
}
|
||||
|
||||
|
@ -502,7 +502,7 @@ public abstract class SecurityHandler extends HandlerWrapper implements Authenti
|
|||
|
||||
if (isAuthMandatory && authenticator == null)
|
||||
{
|
||||
LOG.warn("No authenticator for: " + roleInfo);
|
||||
LOG.warn("No authenticator for: {}", roleInfo);
|
||||
if (!baseRequest.isHandled())
|
||||
{
|
||||
response.sendError(HttpServletResponse.SC_FORBIDDEN);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue