Codota Logo
Logger
Code IndexAdd Codota to your IDE (free)

How to use
Logger
in
org.eclipse.jetty.util.log

Best Java code snippets using org.eclipse.jetty.util.log.Logger (Showing top 20 results out of 909)

Refine searchRefine arrow

  • Resource
  • EndPoint
  • Request
  • Response
  • WebAppContext
  • HttpServletRequest
  • ContextHandler
  • HttpFields
  • HttpChannel
  • URIUtil
  • BufferUtil
  • Common ways to obtain Logger
private void myMethod () {
Logger l =
  • Codota IconLog.getRootLogger()
  • Codota IconString name;new Slf4jLog(name)
  • Codota IconString name;new JavaUtilLog(name)
  • Smart code suggestions by Codota
}
origin: org.eclipse.jetty/jetty-webapp

  if (resourcesDir == EmptyResource.INSTANCE)
    if (LOG.isDebugEnabled()) LOG.debug(target+" cached as containing no META-INF/resources");
    return;    
    if (LOG.isDebugEnabled()) LOG.debug(target+" META-INF/resources found in cache ");
  if (LOG.isDebugEnabled()) LOG.debug(target+" META-INF/resources checked");
  if (target.isDirectory())
    resourcesDir = target.addPath("/META-INF/resources");
    URI uri = target.getURI();
    resourcesDir = Resource.newResource(uriJarPrefix(uri,"!/META-INF/resources"));
      resourcesDir = old;
    else
      if (LOG.isDebugEnabled()) LOG.debug(target+" META-INF/resources cache updated");
Set<Resource> dirs = (Set<Resource>)context.getAttribute(METAINF_RESOURCES);
if (dirs == null)
  context.setAttribute(METAINF_RESOURCES, dirs);
if (LOG.isDebugEnabled()) LOG.debug(resourcesDir+" added to context");
origin: org.eclipse.jetty/jetty-webapp

if (context.isStarted())
  LOG.debug("Cannot configure webapp after it is started");
  return;
LOG.debug("Configuring web-jetty.xml");
Resource web_inf = context.getWebInf();
if(web_inf!=null&&web_inf.isDirectory())
  Resource jetty=web_inf.addPath("jetty8-web.xml");
  if(!jetty.exists())
    jetty=web_inf.addPath(JETTY_WEB_XML);
  if(!jetty.exists())
  if(jetty.exists())
    if(LOG.isDebugEnabled())
      LOG.debug("Configure: "+jetty);
    Object xml_attr=context.getAttribute(XML_CONFIGURATION);
    context.removeAttribute(XML_CONFIGURATION);
    final XmlConfiguration jetty_config = xml_attr instanceof XmlConfiguration?(XmlConfiguration)xml_attr:new XmlConfiguration(jetty.getURI().toURL());
      LOG.warn("Error applying {}",jetty);
      throw e;
origin: org.eclipse.jetty/jetty-webapp

private void dumpUrl()
{
  Connector[] connectors = getServer().getConnectors();
  for (int i=0;i<connectors.length;i++)
  {
    String displayName = getDisplayName();
    if (displayName == null)
      displayName = "WebApp@"+Arrays.hashCode(connectors);
    LOG.info(displayName + " at http://" + connectors[i].toString() + getContextPath());
  }
}
origin: org.eclipse.jetty/jetty-webapp

@Override
public boolean isSystemResource(String name, URL url)
{
  if (_systemClasses == null)
    loadSystemClasses();
  boolean result = _systemClasses.match(name,url);
  if (LOG.isDebugEnabled())
    LOG.debug("isSystemResource=={} {} {}",result,name,url);
  return result;
}
origin: org.eclipse.jetty/jetty-webapp

@Override
public boolean isServerResource(String name, URL url)
{
  if (_serverClasses == null)
    loadServerClasses();
  boolean result =  _serverClasses.match(name,url);
  if (LOG.isDebugEnabled())
    LOG.debug("isServerResource=={} {} {}",result,name,url);
  return result;
}

origin: org.eclipse.jetty/jetty-webapp

@Override
public Class<?> loadClass(String name) throws ClassNotFoundException
{
  if (_notFound.contains(name))
  {
    if (LOG.isDebugEnabled())
      LOG.debug("Not found cache hit resource {}",name);
    throw new ClassNotFoundException(name+": in notfound cache");
  }
  try
  {
    return super.loadClass(name);
  }
  catch (ClassNotFoundException nfe)
  {
    if (_notFound.add(name))
      if (LOG.isDebugEnabled())
      {
        LOG.debug("Caching not found {}",name);
        LOG.debug(nfe);
      }
    throw nfe; 
  }
}
origin: org.eclipse.jetty/jetty-security

LOG.debug("jsecuritycheck {} {}",username,user);
  LOG.debug("authenticated {}->{}",form_auth,nuri);
if (LOG.isDebugEnabled())
  LOG.debug("Form authentication FAILED for " + StringUtil.printable(username));
if (_formErrorPage == null)
  LOG.debug("auth failed {}->403",username);
  if (response != null)
    response.sendError(HttpServletResponse.SC_FORBIDDEN);
  LOG.debug("auth failed {}=={}",username,_formErrorPage);
  LOG.debug("auth failed {}->{}",username,_formErrorPage);
  int redirectCode = (base_request.getHttpVersion().getVersion() < HttpVersion.HTTP_1_1.getVersion() ? HttpServletResponse.SC_MOVED_TEMPORARILY : HttpServletResponse.SC_SEE_OTHER);
  base_response.sendRedirect(redirectCode, response.encodeRedirectURL(URIUtil.addPaths(request.getContextPath(),_formErrorPage)));
  LOG.debug("auth revoked {}",authentication);
  session.removeAttribute(SessionAuthentication.__J_AUTHENTICATED);
      LOG.debug("auth retry {}->{}",authentication,j_uri);
          LOG.debug("auth rePOST {}->{}",authentication,j_uri);
  LOG.debug("auth {}",authentication);
  return authentication;
LOG.debug("auth deferred {}",session == null ? null : session.getId());
origin: org.eclipse.jetty.aggregate/jetty-all-server

@Override
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
  if (HttpMethods.CONNECT.equalsIgnoreCase(request.getMethod()))
  {
    LOG.debug("CONNECT request for {}", request.getRequestURI());
    try
    {
      handleConnect(baseRequest, request, response, request.getRequestURI());
    }
    catch(Exception e)
    {
      LOG.warn("ConnectHandler "+baseRequest.getUri()+" "+ e);
      LOG.debug(e);
    }
  }
  else
  {
    super.handle(target, baseRequest, request, response);
  }
}
origin: org.eclipse.jetty/jetty-security

HttpSession session = httpRequest.getSession(false);
if (session == null || session.getAttribute(SessionAuthentication.__J_AUTHENTICATED) == null)
  return; //not authenticated yet
  return; //didn't save original request method
StringBuffer buf = httpRequest.getRequestURL();
if (httpRequest.getQueryString() != null)
  buf.append("?").append(httpRequest.getQueryString());
if (LOG.isDebugEnabled()) LOG.debug("Restoring original method {} for {} with method {}", method, juri,httpRequest.getMethod());
Request base_request = Request.getBaseRequest(request);
base_request.setMethod(method);
origin: jenkinsci/winstone

public void handleAsync(HttpChannel channel) throws IOException, ServletException
{
  final HttpChannelState state = channel.getRequest().getHttpChannelState();
  final AsyncContextEvent event = state.getAsyncContextEvent();
  final Request baseRequest=channel.getRequest();
  final String path=event.getPath();
  if (path!=null)
  {
    // this is a dispatch with a path
    ServletContext context=event.getServletContext();
    String query=baseRequest.getQueryString();
    baseRequest.setURIPathQuery(URIUtil.addEncodedPaths(context==null?null:URIUtil.encodePath(context.getContextPath()), path));
    HttpURI uri = baseRequest.getHttpURI();
    baseRequest.setPathInfo(uri.getDecodedPath());
    if (uri.getQuery()!=null)
      baseRequest.mergeQueryParameters(query,uri.getQuery(), true); //we have to assume dispatch path and query are UTF8
  }
  final String target=baseRequest.getPathInfo();
  final HttpServletRequest request=(HttpServletRequest)event.getSuppliedRequest();
  final HttpServletResponse response=(HttpServletResponse)event.getSuppliedResponse();
  if (LOG.isDebugEnabled())
    LOG.debug("{} {} {} on {}", request.getDispatcherType(), request.getMethod(), target, channel);
  handle(target, baseRequest, request, response);
  if (LOG.isDebugEnabled())
    LOG.debug("handledAsync={} async={} committed={} on {}", channel.getRequest().isHandled(),request.isAsyncStarted(),response.isCommitted(),channel);
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server

public void handleAsync(HttpChannel connection) throws IOException, ServletException
{
  final HttpChannelState state = connection.getRequest().getHttpChannelState();
  final AsyncContextEvent event = state.getAsyncContextEvent();
  final Request baseRequest=connection.getRequest();
  final String path=event.getPath();
  if (path!=null)
  {
    // this is a dispatch with a path
    ServletContext context=event.getServletContext();
    String query=baseRequest.getQueryString();
    baseRequest.setURIPathQuery(URIUtil.addPaths(context==null?null:context.getContextPath(), path));
    HttpURI uri = baseRequest.getHttpURI();
    baseRequest.setPathInfo(uri.getDecodedPath());
    if (uri.getQuery()!=null)
      baseRequest.mergeQueryParameters(query,uri.getQuery(), true); //we have to assume dispatch path and query are UTF8
  }
  final String target=baseRequest.getPathInfo();
  final HttpServletRequest request=(HttpServletRequest)event.getSuppliedRequest();
  final HttpServletResponse response=(HttpServletResponse)event.getSuppliedResponse();
  if (LOG.isDebugEnabled())
  {
    LOG.debug(request.getDispatcherType()+" "+request.getMethod()+" "+target+" on "+connection);
    handle(target, baseRequest, request, response);
    LOG.debug("RESPONSE "+target+"  "+connection.getResponse().getStatus());
  }
  else
    handle(target, baseRequest, request, response);
}
origin: Nextdoor/bender

public void handleAsync(HttpChannel<?> connection) throws IOException, ServletException
{
  final HttpChannelState state = connection.getRequest().getHttpChannelState();
  final AsyncContextEvent event = state.getAsyncContextEvent();
  final Request baseRequest=connection.getRequest();
  final String path=event.getPath();
  
  if (path!=null)
  {
    // this is a dispatch with a path
    ServletContext context=event.getServletContext();
    HttpURI uri = new HttpURI(URIUtil.addPaths(context==null?null:context.getContextPath(), path));            
    baseRequest.setUri(uri);
    baseRequest.setRequestURI(null);
    baseRequest.setPathInfo(uri.getDecodedPath());
    if (uri.getQuery()!=null)
      baseRequest.mergeQueryParameters(uri.getQuery(), true); //we have to assume dispatch path and query are UTF8
  }
  final String target=baseRequest.getPathInfo();
  final HttpServletRequest request=(HttpServletRequest)event.getSuppliedRequest();
  final HttpServletResponse response=(HttpServletResponse)event.getSuppliedResponse();
  if (LOG.isDebugEnabled())
  {
    LOG.debug(request.getDispatcherType()+" "+request.getMethod()+" "+target+" on "+connection);
    handle(target, baseRequest, request, response);
    LOG.debug("RESPONSE "+target+"  "+connection.getResponse().getStatus());
  }
  else
    handle(target, baseRequest, request, response);
}
origin: org.eclipse.jetty.aggregate/jetty-all-server

public void handle(AbstractHttpConnection connection) throws IOException, ServletException
{
  final String target=connection.getRequest().getPathInfo();
  final Request request=connection.getRequest();
  final Response response=connection.getResponse();
  if (LOG.isDebugEnabled())
  {
    LOG.debug("REQUEST "+target+" on "+connection);
    handle(target, request, request, response);
    LOG.debug("RESPONSE "+target+"  "+connection.getResponse().getStatus()+" handled="+request.isHandled());
  }
  else
    handle(target, request, request, response);
}
origin: org.eclipse.jetty/jetty-webapp

if (context.isStarted())
  if (LOG.isDebugEnabled())
    LOG.debug("Cannot configure webapp "+context+" after it is started");
  return;
Resource web_inf = context.getWebInf();
if (web_inf != null && web_inf.isDirectory() && context.getClassLoader() instanceof WebAppClassLoader)
  Resource classes= web_inf.addPath("classes/");
  if (classes.exists())
    ((WebAppClassLoader)context.getClassLoader()).addClassPath(classes);
origin: org.eclipse.jetty/jetty-webapp

if (lib.exists() && lib.isDirectory())
  String[] files=lib.list();
  if (files != null)
      Resource fn=lib.addPath(files[f]);
      if(LOG.isDebugEnabled())
        LOG.debug("addJar - {}", fn);
      String fnlc=fn.getName().toLowerCase(Locale.ENGLISH);
      LOG.warn(Log.EXCEPTION,ex);
origin: org.eclipse.jetty.aggregate/jetty-server

public void handleAsync(AbstractHttpConnection connection) throws IOException, ServletException
{
  final AsyncContinuation async = connection.getRequest().getAsyncContinuation();
  final AsyncContinuation.AsyncEventState state = async.getAsyncEventState();
  final Request baseRequest=connection.getRequest();
  final String path=state.getPath();
  if (path!=null)
  {
    // this is a dispatch with a path
    final String contextPath=state.getServletContext().getContextPath();
    HttpURI uri = new HttpURI(URIUtil.addPaths(contextPath,path));
    baseRequest.setUri(uri);
    baseRequest.setRequestURI(null);
    baseRequest.setPathInfo(baseRequest.getRequestURI());
    if (uri.getQuery()!=null)
      baseRequest.mergeQueryString(uri.getQuery()); //we have to assume dispatch path and query are UTF8
  }
  final String target=baseRequest.getPathInfo();
  final HttpServletRequest request=(HttpServletRequest)async.getRequest();
  final HttpServletResponse response=(HttpServletResponse)async.getResponse();
  if (LOG.isDebugEnabled())
  {
    LOG.debug("REQUEST "+target+" on "+connection);
    handle(target, baseRequest, request, response);
    LOG.debug("RESPONSE "+target+"  "+connection.getResponse().getStatus());
  }
  else
    handle(target, baseRequest, request, response);
}
origin: i2p/i2p.i2p

if (_ignorePathMap != null && _ignorePathMap.getMatch(request.getRequestURI()) != null)
  return;
    buf.append(request.getServerName());
    buf.append(' ');
  if (_preferProxiedForAddress) 
    addr = request.getHeader("X-Forwarded-For");
  buf.append(request.getProtocol());
  buf.append("\" ");
  int status = response.getStatus();
  if (status<=0)
    status=404;
  long responseLength=response.getContentCount();
  if (responseLength == 0 && status == 200 && !"HEAD".equals(request.getMethod()))
    responseLength = response.getLongContentLength();
  if (responseLength >=0)
Log.getLogger((String)null).warn(e);
origin: org.eclipse.jetty/jetty-webapp

  LOG.warn(new Throwable()); // TODO throw ISE?
LOG.info("NO JSP Support for {}, did not find {}", context.getContextPath(), servlet_class);
servlet_class = "org.eclipse.jetty.servlet.NoJspServlet";
  LOG.warn(new Throwable()); // TODO throw ISE?
LOG.warn("Deprecated boolean load-on-startup.  Please use integer");
order = 1;
  LOG.warn("Cannot parse load-on-startup " + s + ". Please use integer");
  LOG.ignore(e);
  LOG.warn(new Throwable()); // TODO throw ISE?
if (LOG.isDebugEnabled()) LOG.debug("link role " + roleName + " to " + roleLink + " for " + this);
switch (context.getMetaData().getOrigin(name+".servlet.role-name."+roleName))
    LOG.warn(new Throwable()); // TODO throw ISE?
LOG.warn("Ignored invalid security-role-ref element: " + "servlet-name=" + holder.getName() + ", " + securityRef);
    LOG.warn(new Throwable()); // TODO throw ISE?
  LOG.warn(new Throwable()); // TODO throw ISE?
  LOG.warn(new Throwable()); // TODO throw ISE?
  LOG.warn(new Throwable()); // TODO throw ISE?
origin: org.eclipse.jetty/jetty-webapp

protected Resource findWebXml(WebAppContext context) throws IOException, MalformedURLException
{
  String descriptor = context.getDescriptor();
  if (descriptor != null)
  {
    Resource web = context.newResource(descriptor);
    if (web.exists() && !web.isDirectory()) return web;
  }
  Resource web_inf = context.getWebInf();
  if (web_inf != null && web_inf.isDirectory())
  {
    // do web.xml file
    Resource web = web_inf.addPath("web.xml");
    if (web.exists()) return web;
    if (LOG.isDebugEnabled())
      LOG.debug("No WEB-INF/web.xml in " + context.getWar() + ". Serving files and default/dynamic servlets only");
  }
  return null;
}
origin: org.eclipse.jetty/jetty-webapp

  if (tmp.isEmpty())
    if (LOG.isDebugEnabled()) LOG.debug(jar+" cached as containing no tlds");
    return;
    if (LOG.isDebugEnabled()) LOG.debug(jar+" tlds found in cache ");
  if (jar.isDirectory())
    tlds.addAll(getTlds(jar.getFile()));
    URI uri = jar.getURI();
    tlds.addAll(getTlds(uri));
    if (LOG.isDebugEnabled()) LOG.debug(jar+" tld cache updated");
    Collection<URL> old = (Collection<URL>)cache.putIfAbsent(jar, tlds);
    if (old != null)
Collection<URL> metaInfTlds = (Collection<URL>)context.getAttribute(METAINF_TLDS);
if (metaInfTlds == null)
  context.setAttribute(METAINF_TLDS, metaInfTlds);
if (LOG.isDebugEnabled()) LOG.debug("tlds added to context");
org.eclipse.jetty.util.logLogger

Javadoc

A simple logging facade that is intended simply to capture the style of logging as used by Jetty.

Most used methods

  • debug
    Logs the given Throwable information at debug level
  • isDebugEnabled
  • warn
    Logs the given Throwable information at warn level
  • info
    Logs the given Throwable information at info level
  • ignore
    Ignore an exception.This should be used rather than an empty catch block.
  • getName
  • getLogger
  • setDebugEnabled
    Mutator used to turn debug on programmatically.

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setScale (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Reference (javax.naming)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now