openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <ppod...@apache.org>
Subject Re: [DISCUSS] localized trace messages
Date Tue, 08 Jun 2010 16:30:25 GMT


TRACE = Debug by the user
DEBUG = Debug by the support/developer

> 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 
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/DISCUSS-localized-trace-messages-tp4877982p5154475.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Mime
View raw message