getLogger().debug( "loglevel is " + loglevel );
final boolean closeWrappedTargets =
configuration.getAttributeAsBoolean( "close-wrapped-targets", true );
final PriorityFilteringTarget filter = new PriorityFilteringTarget(
Priority.getPriorityForName( loglevel ), closeWrappedTargets );
final Configuration[] configs = configuration.getChildren();
for( int i = 0; i < configs.length; i++ )
{
final LogTargetFactory factory =
m_logTargetFactoryManager.getLogTargetFactory( configs[ i ].getName() );
if( null == factory )
{
throw new ConfigurationException( "Unknown target type '" + configs[ i ].getName()
+ "' at " + configs[ i ].getLocation() );
}
getLogger().debug(
"creating target " + configs[ i ].getName() + ": " + configs[ i ].toString() );
final LogTarget logtarget = factory.createTarget( configs[ i ] );
filter.addTarget( logtarget );
}
return filter;
}