Rename log4j.properties to xdoclet-log4j.properties inside XDoclet JARs
-----------------------------------------------------------------------

         Key: XDT-1578
         URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1578
     Project: XDoclet
        Type: Task
  Components: XDoclet Module  
    Versions: 1.2.3    
 Reporter: Darryl Miles
 Assigned to: xdoclet-devel (Use for new issues) 
    Priority: Minor


The concern with this issue stems from the way XDoclet is invoked from ANT.  
The classpath's in use to load XDoclet itself are usualy the same as the 
classpath's used to compile the target code base XDoclet is working on.  I 
believe there is work being carried out in the ANT project for ANT 1.7 to 
improve that situation.

But in real terms this means the applications log4j.properties file can 
override the one distributed inside XDoclet.

You can see this problem if the target application has a log4j.properties file 
with:

og4j.rootLogger=DEBUG, stdout
log4j.rootCategory=DEBUG

At the top, then run XDoclet on it.


You will see that a ton of XDoclet log entries get emitted which is generally 
not the intended behaviour.

At the moment XDoclet itself uses log4j and expects the default properties file 
of log4j.properties I propose that a logger initialization function be created 
that configures itself using xdoclet-log4j.properties and that all the entry 
points into xdoclet call it before any logging events occur.  I believe the 
developer can still override the default log configuration by providing their 
own xdoclet-log4j.properties in the working classpath but in the common case 
where a user of xdoclet just want its default logging level it would work as 
they expect.

I'm happy to carry out this work but would apperciate information as to where 
to audit for all the entry points into xdcoelt and/or if there is already 
initialization code in place at these points that I could tack logger 
initialization into.


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



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to