[ 
http://issues.apache.org/jira/browse/NUTCH-236?page=comments#action_12414599 ] 

Chris A. Mattmann commented on NUTCH-236:
-----------------------------------------

Hi Jason, 

   I'll have a patch prepared for this issue shortly, and I'll attach it to 
JIRA by this Sunday night.

Thanks,
  Chris


> PdfParser and RSSParser Log4j appender redirection
> --------------------------------------------------
>
>          Key: NUTCH-236
>          URL: http://issues.apache.org/jira/browse/NUTCH-236
>      Project: Nutch
>         Type: Bug

>     Versions: 0.8-dev
>  Environment: Linux, Nutch embedded in an other application
>     Reporter: Jason Calabrese
>     Assignee: Chris A. Mattmann
>     Priority: Minor

>
> I just found a bug in the way the log messages from Hadoop LogFormatter are 
> added as a new appender to the Log4j rootLogger in the PdfParser and 
> RSSParser.
> Since a new Log4j appender is created and added to the root logger each time 
> these classes are loaded log messages start getting repeated.
> I'm using Nutch/Hadoop inside an other application so other may not be seeing 
> this problem.
> I think the simple fix is as easy as setting a name for the new appender 
> before adding it and then at the begining of the constructor checking to see 
> if it's already been added.
> Also as the comment says in both the PdfParser and RSSParser this code should 
> be moved to a common place.
> I'd be happy to make these changes and submit a patch, but I wanted to know 
> it 
> the change would be welcome first.  Also does anyone know a good place for 
> the new util method?  Maybe a new static method on LogFormatter, but then the 
> log4j jar would need to be added to the to the common lib and the classpath.
> It would also be good to create a property in nutch-site.xml that could 
> disable this logging appender redirection.
> Like I said above I'd be more than happy to do this work, I'll just need some 
> guidance to follow the project's conventions.

-- 
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

Reply via email to