/** * Return local host IP. Note: HttpServletRequest#getLocalAddr() doesn't seem to be consistent. * This method uses java.net.InetAddress. * * @see InetAddress#getHostAddress() * @return server IP */ public static String getLocalHostAddress() { try { return InetAddress.getLocalHost().getHostAddress(); } catch (Exception e) { log.debug("Exception occurred obtaining localhost IP address", e); return null; } }
/** * Logs a session event. * * @param session The session. * @param event The text describing the event. */ private void logSessionEvent(Session session, String event) { log.debug(() -> "Session #" + session.getId() + " " + event + "."); }
/** * Logs at trace level the request headers */ public static void logHeaderNames() { HttpServletRequest request = getRequest(); if (request == null) { log.debug("logHeaderNames() invoked outside the scope of a servlet request"); } else if (log.isTraceEnabled()) { Enumeration<?> enumeration = request.getHeaderNames(); while (enumeration.hasMoreElements()) { String headerName = (String) enumeration.nextElement(); log.trace(String.format("HeaderName: %s", headerName)); } } }
log.debug(() -> "Parsing configuration data for web jar: " + resource); WebJar webjar = new WebJar(resource); String name = webjar.getName();
log.debug(message); break;
/** * Creates and registers a component definition for a class by scanning the class and its * superclasses for method annotations. * * @param clazz Class to scan. */ @Override protected void doScanClass(Class<BaseComponent> clazz) { log.debug(() -> "Processing @Component annotation for class " + clazz); ComponentDefinition def = new ComponentDefinition(clazz); MethodScanner.scan(clazz, method -> { def._addSetter(method); def._addGetter(method); }); MethodScanner.scan(def.getFactoryClass(), method -> { def._addFactoryParameter(method); }); ComponentRegistry.getInstance().register(def); }