Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 68134 invoked from network); 8 Jun 2010 19:31:18 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Jun 2010 19:31:18 -0000 Received: (qmail 1834 invoked by uid 500); 8 Jun 2010 19:31:18 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 1812 invoked by uid 500); 8 Jun 2010 19:31:18 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 1804 invoked by uid 99); 8 Jun 2010 19:31:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jun 2010 19:31:18 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of michael.d.dick@gmail.com designates 209.85.214.46 as permitted sender) Received: from [209.85.214.46] (HELO mail-bw0-f46.google.com) (209.85.214.46) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jun 2010 19:31:10 +0000 Received: by bwz11 with SMTP id 11so1471770bwz.33 for ; Tue, 08 Jun 2010 12:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=oXaMJr6zXKrQbcArcKbV0Sa8c/2eKEk7MI+kE+ILdj0=; b=DNE3hxOykFAuBhz48y1ygFmqtQmhd1+wHl4+wpvy6W3FcAoCmr8Kb3qVVFy6O2Vonr j8w7B/5V4yUFI0mOM8Es0cR5g52NgC0cPGIWWe/Uhbv5D5DfIkdm/iNKnRkWa6hh70sr 9bY343qIph6pRcS5slhnHkJZbxMSjg4FFfWI4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=xc02CczFbr2UePRFHYoaEfZ1hezcjzcr0qch+wpNiBhJGQoqKfu/1YN74B2Bfr4GdV vINZwzhAIfFeaFcQXtyYHqGO6yxmJdSD656dSlkVNP0344mhN42PSN48tEnhEgJL7OY/ q4GoMbRoZb1mSDgsVxFKAGZKVAmvi0EL1wKqk= Received: by 10.204.6.24 with SMTP id 24mr667386bkx.181.1276025450372; Tue, 08 Jun 2010 12:30:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.116.76 with HTTP; Tue, 8 Jun 2010 12:30:30 -0700 (PDT) In-Reply-To: <4C0E72FB.8050902@apache.org> References: <1270830371201-4878105.post@n2.nabble.com> <4BC32F7E.2040200@apache.org> <4C0E66E9.4080503@apache.org> <1276014625050-5154475.post@n2.nabble.com> <4C0E72FB.8050902@apache.org> From: Michael Dick Date: Tue, 8 Jun 2010 14:30:30 -0500 Message-ID: Subject: Re: [DISCUSS] localized trace messages To: dev@openjpa.apache.org Content-Type: multipart/alternative; boundary=0015174c0e9ab19e23048889d310 X-Virus-Checked: Checked by ClamAV on apache.org --0015174c0e9ab19e23048889d310 Content-Type: text/plain; charset=ISO-8859-1 +1 On Tue, Jun 8, 2010 at 11:42 AM, Donald Woods wrote: > > > On 6/8/10 12:30 PM, Pinaki Poddar wrote: > > > > > > TRACE = Debug by the user > > DEBUG = Debug by the support/developer > > > > If you follow the Log4J (and SLF4J) definitions and hierarchy, then > TRACE is more detailed than DEBUG, with the increasing amount of logging > being - > > ERROR > WARN - includes ERROR > INFO - includes WARN, ERROR > DEBUG - includes INFO, WARN, ERROR > TRACE - includes DEBUG, INFO, WARN, ERROR > > Thus, TRACE is used for internal OpenJPA "trace" messages, which should > not be translated. > > If someone wants trace logging for Enhancer, then they should expect > very low-level untranslated messages. > > Also, we have to be careful that TRACE level logging does not > drastically slow down the code, otherwise it is useless, which having to > load translated messages for every TRACE statement would surely do. > > > > >> Mike wrote: > >> I submit that such messages are really info or warning messages (an > >> example that proves me wrong > >> might be good). > > > > The example use case for TRACE is seeing how mapping strategy is getting > > decided or PCEnhancer working -- the monikers are familiar to the user > > (because s/he had specified it) -- and s/he is looking at the trace to > > decipher how the mapping annotations are being interpreted by OpenJPA (or > > not). The data presented in those messages are informative from a user > point > > of view and *does not* expose the internal data structures as much. > > > > DEBUG messages, on the other hand, is a tool for support/development -- > > describes state of internal data structures if necessary (say state of a > bit > > flag on when a flush is being called), no need to be localized/user > focused. > > > > TRACE has traditionally been localized and thousands of localized trace > > messages do exist in the code base is strong enough reason to retain that > > behavior. Any other choice now will offer the weird output where > > non-localized messages intermingle the localized messages. > > > >> If we feel a message is important enough to translate, then it should > be > >> using either the INFO or WARN level. > > > > TRACE is not about importance of a message -- INFO is for that. TRACE is > to > > expose the inner operational logic/flow to the user as much as possible > > without inundating with internal details. > > > > > > > >> It is just the use of localized message in TRACE are not consistent. I > >> noticed that there are trace > >> records that are localized and some are not > > > > That is more of an oversight -- I had never noticed a non-localized > message > > in OpenJPA till recently. > > Please note that there are huge number of localized trace messages exists > > today. Someone must have been diligent enough to make that happen. > > > >> Historically, we made the following choices: 2. Don't bother localizing > >> trace statements, > > > > Not supported by code. See PCEnhancer. > > > > > > > > > > > > > > > > > > > > ----- > > Pinaki > --0015174c0e9ab19e23048889d310--