openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-10) persistence unit name should be default diagnostic context for standard OpenJPA log impl
Date Thu, 10 Aug 2006 01:36:14 GMT
    [ http://issues.apache.org/jira/browse/OPENJPA-10?page=comments#action_12427071 ] 
            
Patrick Linskey commented on OPENJPA-10:
----------------------------------------

To implement this, we will need to change LogFactoryImpl to check for a PU name during its
configuration. This probably means making LogFactoryImpl implement Configurable, and then
doing the appropriate processing at the right points in the Configurable's lifecycle.

I do not know if the PU name is available directly from an OpenJPAConfiguration; we may need
to do some work to register the PU name with the OpenJPAConfiguration, probably from PersistenceProviderImpl.

> persistence unit name should be default diagnostic context for standard OpenJPA log impl
> ----------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-10
>                 URL: http://issues.apache.org/jira/browse/OPENJPA-10
>             Project: OpenJPA
>          Issue Type: Improvement
>            Reporter: Patrick Linskey
>            Priority: Minor
>
> OpenJPA's default logging implementation has a concept of a diagnostic context, roughly
stolen from log4j. The basic idea is that in a configuration file, the user can specify a
diagnostic context string that will be printed out with each log message. The result is that
if a user has multiple EntityManagerFactories running in the same JVM, she can distinguish
between the different logging outputs, even if they all just go to stderr.
> The JPA spec requires that persistence units are named uniquely. This presents us with
an opportunity: we could check for the existence of multiple EMFs and, if found and the user
did not specify a diagnostic context, automatically set the logging diagnostic context based
on the name of the persistence unit.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message