Re: Logging POST parameters

2025-06-23 Thread Mikhail Khludnev
Andrew, here are two thoughts? What if you add an arbitrary request param like foo=user_input_or_req_id, I expect that it will be logged in slow log. May you achieve your need via this trick? Regarding SOLR-17794 , do you expect a whole payload will

Re: Logging POST parameters

2025-06-23 Thread Andrew Hankinson
Done, thank you. https://issues.apache.org/jira/browse/SOLR-17794 -Andrew > On 23 Jun 2025, at 14:42, Mikhail Khludnev wrote: > > In that phrase I invited you to contribute the code, which fits in the > generic usecase. But, ok you can start with a JIRA ticket, it seems like > the lack of func

Re: Logging POST parameters

2025-06-23 Thread Mikhail Khludnev
In that phrase I invited you to contribute the code, which fits in the generic usecase. But, ok you can start with a JIRA ticket, it seems like the lack of functionality. Meanwhile, the particular case might be fixed quickly (and dirty) with a custom few-lines component. On Mon, Jun 23, 2025 at 2:

Re: Logging POST parameters

2025-06-23 Thread Andrew Hankinson
My Java knowledge is limited to read-only, but could you tell me more about what you mean by "a contribution for common cases is welcomed!"? I'm happy to write docs or a use case or a JIRA ticket if that is worthwhile? > On 23 Jun 2025, at 12:41, Mikhail Khludnev wrote: > > Turns out that par

Re: Logging POST parameters

2025-06-23 Thread Andrew Hankinson
Sorry -- I also meant to mention that I set `logParamsList=json` but that didn't work because I think it's looking for a "&json=... GET parameter. > On 23 Jun 2025, at 10:14, Mikhail Khludnev wrote: > > Hi, > It seems like it works by design. see > https://github.com/apache/solr/blob/e17078a98a

Re: Logging POST parameters

2025-06-23 Thread Mikhail Khludnev
Turns out that params are loaded into req.toLog here [1] that's happened before stream body is parsed and json is inserted as json param at [2] As a quick custom fix you may develop a component which will put req.params.json into req.toLog. Also, a contribution for common cases is welcomed! [1] h

Re: Logging POST parameters

2025-06-23 Thread Andrew Hankinson
I think it only looks at the GET parameters, though. With the JSON Request API, the parameters are sent in the body of the request, and I can't see any code in the links that you sent that looks at the body of the request for the search parameters. > On 23 Jun 2025, at 10:14, Mikhail Khludnev

Re: Logging POST parameters

2025-06-23 Thread Mikhail Khludnev
Hi, It seems like it works by design. see https://github.com/apache/solr/blob/e17078a98a8ebea1a28853d02527f4dc81da4d6b/solr/core/src/java/org/apache/solr/core/SolrCore.java#L2932 It logs only query string params if logParamsList is absent, and perhaps you'll get all json request logged if set logPa