The configurators would be responsible for creating the appenders, activating them and attaching them to the logger repository. Don't think there is anything that you can do at the LogManager or LoggerRepository level to interfere with the activation of the appenders which is what I think you want to avoid.
If you aren't interested in a branch of the hierarchy, you could always remove the appenders from the configuration. In general, appenders try to obtain their resources at configuration time for a few good reasons. You could write an appender that obtains its resources at the first handled logging event, but your first logged event would be very expensive and you'd really need to watch for concurrency issues. The standard appenders were not carefully designed for concurrency and avoid most of their potential dangers by being activated early. I don't expect many of them would work well if they had multiple threads firing at them and the first one was trying to obtain resources. On Oct 6, 2010, at 5:31 PM, Dana Irvin wrote: > Hello all. I’m curious as to the functionality of the LogManager and the > various configurators in Log4cxx. Is there a way to filter out loggers from > being added to the LogManager based on a runtime parameter? I load a set of > configuration files, some with logger names that represent a hierarchy I’m > interested in, some with ones I’m not. But all the files are loaded up. Is > there a way to filter those loggers out so their respective appenders aren’t > activated? > > -D > > This e-mail and any attachments are confidential CVG, Inc/Avtec Systems > communications. If you are not the intended recipient, please delete this > message and notify the sender. The views expressed are those of the sender > and not necessarily those of CVG,Inc/Avtec Systems. All emails are scanned > for viruses, but no guarantees are made that it is virus-free.