问题
I am working on Solr and using Jetty. Now in logs folder in Solr home I see Solr logs but in them I do not see IP address of the client. Are jetty logs stored somewhere else? How can I get to know the client IP address in the logs?
Here is what I see in my solr logs:
INFO - 2015-03-18 23:20:08.228; org.apache.solr.core.SolrCore; [collection1] webapp=/solr path=/select params={indent=true&q=michael&wt=json} hits=16618 status=0 QTime=40
回答1:
What you're seeing are application logs, where, as the name suggests, applications deployed within Jetty can inform about their activity.
What you want is the so-called access.log which is somethign that hasn't to do with applications but instead related with the HTTP server.
Other than checking your Jetty config (if I remember well in some distributions that kind of log handler are just commented out) you can learn how to configure the access.log here: http://eclipse.org/jetty/documentation/current/configuring-jetty-request-logs.html and here Jetty HTTP logging
来源:https://stackoverflow.com/questions/29598914/jetty-logs-location