I think requests should definitely be logged at info level since it is something admins should be monitoring, whether for performance or for tweaking relevancy if users paginate a lot, or choosing warming queries, etc. This said, it would be even better to have those separated out in a dedicated request log file by default so that you could monitor those without clogging the rest of the logs.

Steve

From: Steve Davids [[email protected]]
Sent: August 25, 2014 9:45 PM
To: [email protected]
Subject: Re: Logging levels in Solr code

I am personally in favour of some record of any request sent to a server being logged by default to help trace activity

It seems as though that would be more of a TRACE level item. 

I have used the Log4J/SLF4J MDC to provide a distributed transaction id which makes life much easier to trace requests throughout the request chain, then display that transaction id for every item in the various logs. It is simple to implement, create a HTTPClient HttpRequestInterceptor to always append a header value to each request with the transaction UUID, that transaction ID is either taken off of the request via a ServletFilter or some other mechanism or automatically generated if it wasn’t present on the incoming request. Then simply reference the MDC value in the Log4J pattern via something like: %X{transactionId}.

I have found it extremely difficult to try and debug some of the distributed requests especially when I know that there are some servers that are having issues with socket connection timeouts, though the LBSolrServer doesn’t log when exceptions are thrown or when retry attempts are happening. I would love to see trace/debug level logging for initiating requests and info/warn if a request was unsuccessful for any reason.

Just some thoughts, you really only come across these things when things aren’t working right and it annoys you when the option isn’t there :)

-Steve

On Aug 25, 2014, at 6:04 PM, Mark Miller <[email protected]> wrote:



On Aug 25, 2014, at 5:21 PM, Ramkumar R. Aiyengar <[email protected]> wrote:

I am personally in favour of some record of any request sent to a server being logged by default to help trace activity

Certainly you should have the option to turn it on, but I don’t think it makes a great default. I don’t think the standard user will find it that useful and it will flood logs, making finding other useful information more difficult and ballooning retention requirements so that you don’t lose relevant logs. When you batch or stream, it also only logs a subset of the adds by default.

- Mark

http://about.me/markrmiller
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

Reply via email to