persistence@glassfish.java.net

Re: CONFIG log messages?

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Mon, 16 Oct 2006 13:40:07 -0700

Hi Tom,

One question below.

Tom Ware wrote On 10/16/06 07:16,:
> Hi Marina,
>
> Comments inline.
>
> Marina Vatkina wrote:
>
>
>>Hi Tom,
>>
>>If we change defaults to INFO (which is also the GF default), the following
>>messages will not be logged by default:
>>
>>I. Via SessionLog.CONFIG
>>
>>1. EntityManagerFactoryProvider
>> a) translateOldProperties
>>=> this is the only one that you suggested to move to the INFO level
>>
>>
>
> I think changing this one to INTO is a good idea.
>
>
>>2. DatabaseAccessor
>> a) buildConnectLog -> displays connection info
>>=> this might be important to display always, i.e. move it to the INFO level.
>>
>> b) connect -> "connecting" message
>> c) disconnect -> "disconnect" message
>> d) reestablishConnection -> "reconnecting" message
>>
>>
>
> DatabaseAccessor has always logged the way it currently does. I believe
> the default logging behavior should be the same with JPA as with other
> TopLink applications. Since we are changing the JPA default to the same
> as the default in the rest of TopLink, I believe this should remain the
> way it is.

Do you mean a) stay at CONFIG, and not be displayed by default? or
b) move to INFO and be displayed without any input from the user?

>
>
>>3. MetadataProcessor
>> a) handleORMException
>> b) buildEntityList -> "exception_loading_entity_class"
>>=> should this be an exception or at least a warning instead?
>>
>>
>
> I think it would make sense to make this a warning.
>
> Aside from the changes above, I think we are ok with keeping the logging
> levels the same as they currently are. The amount that is logged by
> default should be limited to what is absolutely necessary.

Agree.

thanks,
-marina

>
> -Tom
>
>
>>4. EntityManagerSetupImpl
>> a) buildEntityList -> same as 3b) above (Sahoo, why do we have 2 methods doing
>>the same thing?)
>>
>>II. Via logConfigMessage() call
>>
>>5. MetadataAccessor
>> a) getName -> logging the defaulting field
>>
>>6. ClassAccessor
>> a) processEntity -> logging alias name
>>
>>7. RelationshipAccessor
>> a) setReferenceClass -> logging the defaulting column name
>>
>>8. MetadataHelper
>> a) isOneToMany -> defaulting message
>> b) isOneToOne -> defaulting message
>>
>>Do you agree with the proposed changes?
>>
>>thanks,
>>-marina
>>
>>