I have written my own Appender by extending AppenderSkeleton. Log4j uses this Appender, so everything is fine.
But I need my application to access this Appender at runtime so that they can register with this Appender to get the logging events forwarded (the Appender has a method register() that is called by all classes that want to get the LoggingEvents forwarded).
But now I have the problem accessing the Appender.


I tried it this way:

logger = Logger.getLogger(NetzAppManager.class);
logger.info("got the logger");                        
Enumeration e= logger.getAllAppenders();


The Problem is, I get a NullNumeration. The appenders obviously exist, since the logger.info() statement works, I get append() events on all appenders.


What have I done wrong?

Marco


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



Reply via email to