Package org.apache.log.output

Examples of org.apache.log.output.PriorityFilteringTarget


        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;
    }
View Full Code Here


        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;
    }
View Full Code Here

TOP

Related Classes of org.apache.log.output.PriorityFilteringTarget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.