Maybe what is needed is one or both of: 1. A parameter to raise the log level temporarily for the duration of a single request.
2. An administrative command to raise the log level for a designated short interval of time, like, say, 10 seconds. Or... 3. An administrative command to dynamically set some regex-like patterns to temporarily raise the log level when something in the request, like the query string, matches one of a set of patterns. Simply doing a regex on the query string alone is probably sufficient for many common use cases. -- Jack Krupansky From: Steve Davids Sent: Monday, 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]
