Issue Details (XML | Word | Printable)

Key: NUCACCESS-50
Type: Improvement Improvement
Status: Closed Closed
Resolution: Won't Fix
Priority: Minor Minor
Assignee: Unassigned
Reporter: Cyril Bouteille
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus AccessPlatform

Add property to customize Logging API used

Created: 10/Aug/09 06:26 PM   Updated: 06/Aug/12 05:44 PM   Resolved: 04/Aug/12 04:47 PM
Component/s: None
Affects Version/s: 1.1.5
Fix Version/s: None

Environment: J2EE application server with multiple WARs in an EAR

Severity: Development


 Description  « Hide
In certain J2EE environments with the collocation of multiple enterprise projects, it is possible for log4j API to be visible in the CLASSPATH of component A while the library is actually from component B. In such cases, DN in component A defaults to log4j API per rules described @ http://www.datanucleus.org/products/accessplatform_1_1/logging.html and if component A is designed to use a different logging API such as JDK14, there seems to be no way to configure DN to use the desired logging API.
Is it possible to create an optional property such as
datanucleus.Log=JDK14
so that an override of CLASSPATH-driven behavior can be made?
Thank you,

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 03/Sep/09 01:30 PM
Definition of what is in the CLASSPATH when initialising the logger is done independent of creation of PMF/EMFs currently. Consequently this cannot be made as is.

Cyril Bouteille added a comment - 03/Sep/09 04:57 PM
Do you mean this logic is handled by 3rd party libs and DN has no control over it?

Andy Jefferson added a comment - 09/Dec/09 08:54 PM
Look at NucleusLogger. That defines what is being used ... when the class is initialised. This is done independent of when a PMF/EMF is created hence there is no way a persistence property could have any effect on it, with the current logging setup

Andy Jefferson added a comment - 04/Aug/12 04:47 PM
Don't see how that could be achieved (without major work), and people don't contribute their time so will not be touched