[
https://issues.apache.org/jira/browse/SOLR-13286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16782891#comment-16782891
]
Gus Heck commented on SOLR-13286:
---------------------------------
[~erickerickson], what's not obvious looking at just the patch, because of
limited context, is that the method that conducts this logging is
{{org.apache.solr.servlet.HttpSolrCall#handleAdminRequest}} which covers every
admin command, not just metrics. Another possibility would be to add a
{{Marker}} with the name of the handler class (plus some prefix/suffix), and
then we could add filters in the {{log4j.xml}} to cull the logging any handler
which would be even nicer, but I was unsure of the cost of having so many
markers and creating them on the fly... after reading the log4j code, I
suspect this is not that bad at all, and I'll post a new patch doing that
instead. This log statement likely didn't originally anticipate that a feature
would be added to execute very long admin commands on a timed basis this
frequently.
As for the string generated in {{getToLogAsString()}}, that's pre-existing and
was always generated in every case in the prior code already. That method call
could be inlined to allow this patch to also save one String object per minute
when not in debug mode, but I felt readability and DRY were more important, but
AFAICT, it's splitting hairs either way and I'll be happy to change it if you
don't agree.
I found the user list email that had noted this issue previously, it has a nice
example of how obnoxious these log lines can be.
[http://lucene.472066.n3.nabble.com/Why-solr-sends-a-request-for-a-metrics-every-minute-td4423866.html]
I suspect this user "fixed" it by hiding all admin command logging. (which
possibly is ok for some folks, but I'm guessing I'm not the only one who
doesn't like that option)
> Move Metrics handler and any other noisy admin logging to debug
> ---------------------------------------------------------------
>
> Key: SOLR-13286
> URL: https://issues.apache.org/jira/browse/SOLR-13286
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: logging
> Affects Versions: master (9.0)
> Reporter: Gus Heck
> Priority: Minor
> Attachments: SOLR-13286.patch
>
>
> Lately when looking at log files I always find myself straining and squinting
> to see things among a vast sea of metrics related logging. The problem
> appears to be that the metrics system regularly issues /admin/ commands that
> get logged at info by HttpSolrCall, so turning this down also means you can't
> see any other admin commands, which is often what you're looking for in the
> first place (ok what I'm often looking for at least :) ). I also recall
> seeing a complaint about this on one of the lists at some point.
> Attaching patch to log at an alternate level these based on the value of the
> handler field in HttpSolrCall. Patch is untested and meant as fodder for
> commentary and for suggestions of other handlers that might want to go on the
> "noisy" list.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]