From dev-return-321203-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Sat May 5 20:06:04 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 60137180671 for ; Sat, 5 May 2018 20:06:04 +0200 (CEST) Received: (qmail 8892 invoked by uid 500); 5 May 2018 18:06: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 8882 invoked by uid 99); 5 May 2018 18:06:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 May 2018 18:06:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 59399C0189 for ; Sat, 5 May 2018 18:06:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, 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 (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id dlKCgqFvxv6v for ; Sat, 5 May 2018 18:06: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 42C4C5F3F4 for ; Sat, 5 May 2018 18:06: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 A7269E0C50 for ; Sat, 5 May 2018 18:06: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 28D0F21296 for ; Sat, 5 May 2018 18:06:00 +0000 (UTC) Date: Sat, 5 May 2018 18:06: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=16464852#comment-16464852 ] Ralph Goers commented on SOLR-11453: ------------------------------------ Yes, as the implementation of those shows, it is entirely possible to dynamically create appenders. If those don't exactly meet your needs you could look at what they do and create something similar that does. You could either include that with Solr or provide a patch to Log4j to include it. For example, if you don't want to rely on a Script you could modify ScriptAppenderSelector to be SystemPropertyAppenderSelector where the build method would rely on the system property to choose which Appender to create. > 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