From dev-return-321174-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Sat May 5 09:32:10 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id D073A180671 for ; Sat, 5 May 2018 09:32:09 +0200 (CEST) Received: (qmail 50136 invoked by uid 500); 5 May 2018 07:32:02 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 50126 invoked by uid 99); 5 May 2018 07:32:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 May 2018 07:32:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id F0412C997C for ; Sat, 5 May 2018 07:32:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 9__1G_LUUvm9 for ; Sat, 5 May 2018 07:32:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 1D3B15F1F0 for ; Sat, 5 May 2018 07:32:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 60610E010F for ; Sat, 5 May 2018 07:32:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1DFF221297 for ; Sat, 5 May 2018 07:32:00 +0000 (UTC) Date: Sat, 5 May 2018 07:32:00 +0000 (UTC) From: "Ralph Goers (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SOLR-11453) Create separate logger for slow requests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-11453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16464689#comment-16464689 ] Ralph Goers commented on SOLR-11453: ------------------------------------ If you want to have a configuration that is only enabled under special circumstances you can use the RoutingAppender - http://logging.apache.org/log4j/2.x/manual/appenders.html#RoutingAppender or the ScriptAppenderSelector - http://logging.apache.org/log4j/2.x/manual/appenders.html#ScriptAppenderSelector. If those don't fit the bill make a suggestion for how you would like it to work. > Create separate logger for slow requests > ---------------------------------------- > > Key: SOLR-11453 > URL: https://issues.apache.org/jira/browse/SOLR-11453 > Project: Solr > Issue Type: Improvement > Components: logging > Affects Versions: 7.0.1 > Reporter: Shawn Heisey > Assignee: Shawn Heisey > Priority: Minor > Attachments: SOLR-11453.patch, SOLR-11453.patch, SOLR-11453.patch > > > There is some desire on the mailing list to create a separate logfile for slow queries. Currently it is not possible to do this cleanly, because the WARN level used by slow query logging within the SolrCore class is also used for other events that SolrCore can log. Those messages would be out of place in a slow query log. They should typically stay in main solr logfile. > I propose creating a custom logger for slow queries, similar to what has been set up for request logging. In the SolrCore class, which is org.apache.solr.core.SolrCore, there is a special logger at org.apache.solr.core.SolrCore.Request. This is not a real class, just a logger which makes it possible to handle those log messages differently than the rest of Solr's logging. I propose setting up another custom logger within SolrCore which could be org.apache.solr.core.SolrCore.SlowRequest. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org