Hi,

I have the following problem : say I have two classes
:

abstract class A { Logger log =
Logger.getLogger(this.getClass(); }

class B extends A { log.debug("foo"); }

class C extends A { log.debug("bar"); }

I declared the RootLogger as a file logger to a file
named "main.log"

When I look at the main.log file, I have the log from
both B and C, with both information about the class
which made the log.

Now, if I declare another logger, especialy for the B
class, I can see B's log messages in both the root
logger and its dedicated logger.

C's log appears only in the main logger (as expected)


Problem is : for the B class, why does the root logger
gets the message too ?

Is it a side-effect because I declare the logger in an
abstract superclass and I declared the custom logger
upon the B class ?

Is there a way to tell "if I have a dedicated logger
for a class, use it but do not log to the root logger
?"


thanks,
ionel

_________________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
Yahoo! Mail : http://fr.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to