4 messages in org.apache.logging.log4j-userRe: RE: logger.info() logs twice to t...
FromSent OnAttachments
nak...@drexel.eduJun 1, 2004 12:52 pm 
Alan BrownJun 1, 2004 3:33 pm 
john...@expeditors.comJun 1, 2004 3:57 pm 
nak...@drexel.eduJun 1, 2004 8:04 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: RE: logger.info() logs twice to the consoleActions...
From:nak...@drexel.edu (nak@drexel.edu)
Date:Jun 1, 2004 8:04:06 pm
List:org.apache.logging.log4j-user

It sounds like you've not set additivity correctly (there's been a poston that subject already today).

I just subscribed, that's why I probably missed it.

your logger may have 2 appenders set to it, the fileAppender and a consoleAppender. This is in addition to the root logger which also hasa consoleAppender causing double logging.

That's what I suspected, but I just started using log4j. What confused me was
that the documentation says that adding an already added appender won;t result
in adding the same appender twice. Now, I realize that this applies only in the
case when you try to add the same appender to the same instance, but does not
apply in the cases when this appender was added to an instance of a parent
class.

Anyway, thanks for clearing that up for me.

Nik