Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 38837 invoked from network); 5 Dec 2008 19:06:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Dec 2008 19:06:54 -0000 Received: (qmail 5955 invoked by uid 500); 5 Dec 2008 19:07:04 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 5872 invoked by uid 500); 5 Dec 2008 19:07:04 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 5863 invoked by uid 99); 5 Dec 2008 19:07:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Dec 2008 11:07:04 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.125.92.25] (HELO qw-out-2122.google.com) (74.125.92.25) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Dec 2008 19:05:34 +0000 Received: by qw-out-2122.google.com with SMTP id 5so39730qwi.53 for ; Fri, 05 Dec 2008 11:06:11 -0800 (PST) Received: by 10.214.44.2 with SMTP id r2mr585148qar.146.1228503971072; Fri, 05 Dec 2008 11:06:11 -0800 (PST) Received: from ?10.17.4.4? (pool-173-48-164-75.bstnma.fios.verizon.net [173.48.164.75]) by mx.google.com with ESMTPS id 26sm2507980qwa.30.2008.12.05.11.06.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 05 Dec 2008 11:06:10 -0800 (PST) Message-Id: <346DD31B-A72A-42EE-AF2C-2366CEE20BB3@mikemccandless.com> From: Michael McCandless To: java-dev@lucene.apache.org In-Reply-To: <49397AFD.5060706@apache.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: Java logging in Lucene Date: Fri, 5 Dec 2008 14:06:08 -0500 References: <786fde50812051017k477c6d11tf112678525d9ad84@mail.gmail.com> <49397AFD.5060706@apache.org> X-Mailer: Apple Mail (2.929.2) X-Virus-Checked: Checked by ClamAV on apache.org I also feel that the primary usage of the internal messaging in Lucene today is debugging, and we don't need a logging framework for that. Mike Doug Cutting wrote: > The infoStream stuff goes back to 1997, before there was log4j or any > other Java logging framework. > > There's never been a big push to add logging to Lucene. It would > add a dependency, and Lucene's jar has always been standalone, which > is nice. Dependencies can conflict. If Lucene requires one version > of a dependency, then it may not work well with code that require a > different version of that dependency. > > And it hasn't been clear which framework to adopt. Log4j is the > granddaddy, then there's Java logging and commons logging. Today > the preferred framework is probably SLF4J. Good thing we didn't > choose the wrong one years ago! > > And how many log entries would folks really want to see per query or > document indexed? In production I don't think most folks want to > see more than one entry per query or document indexed. So finer- > grained logging would be for debugging. For that one can instead > use a debugger. Hence the traditional lack of demand for detailed > logging in Lucene. > > That's the history as I recall it. The future is less clear. > > Doug > > Grant Ingersoll wrote: >> I think the main motivation has always been to have no dependencies >> in the core so as to keep it as fast and lightweight as possible. >> Then, of course, there is always the usual religious wars around >> which logging framework to use, not to mention the nightmare that >> is trying to manage multiple logging frameworks across several >> projects that are being integrated. Then, of course, there is the >> question of how useful any core Lucene logs would be to users >> writing search applications. For the most part, my experience has >> been that I want logging to tell me when a document was added, when >> searches occur, etc. but I don't necessarily need to know things >> like the fact that Lucene is now entering the analysis phase of >> Document inversion. And, for all these needs, I can just as well >> do that logging in the application and not in Lucene. >> All that is not to say we couldn't add in logging, I'm just >> suggesting reasons I can think of for why it has not been added to >> date and why I am not sure it needs to be there going forward. I >> believe various other people have contributed reasons in the past. >> I seem to recall Doug spelling some out, but don't have the thread >> handy. >> -Grant >> On Dec 5, 2008, at 1:17 PM, Shai Erera wrote: >>> Hi >>> >>> I was wondering why doesn't the Lucene code uses Java logging, >>> instead of the infoStream set in IndexWriter? Today, if I want to >>> enable tracing of Lucene code, the only thing I can do is set an >>> infoStream, but then I get many many messages. Moreoever, those >>> messages seem to cover indexing code only. >>> >>> I hope to get some opinions on the use of Java logging instead of >>> infoStream, and hopefully to start addind logging messages in >>> other places in the code (like during search, query parsing etc.) >>> >>> I feel that this is an approach the community has to decide on >>> before we start adding messages to the code. Using Java logging >>> can greatly benefit tracing of indexing applications who use >>> Lucene. If the vote is +1 for using Java logging, we can start by >>> deprecating infoStream (in 2.9, remove in 3.0) and use logging >>> instead. >>> >>> What do you think? >>> >>> Shai >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-dev-help@lucene.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-dev-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org