Package org.apache.log

Examples of org.apache.log.LogTarget


                                                  + "' 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


    public void dispose()
    {
        final Iterator iterator = m_targets.iterator();
        while( iterator.hasNext() )
        {
            final LogTarget target = (LogTarget)iterator.next();
            if( target instanceof Closeable )
            {
                ( (Closeable)target ).close();
            }
        }
View Full Code Here

        throws ConfigurationException
    {
        final int queuesize = configuration.getAttributeAsInteger( "queue-size", -1 );
        final Configuration config = configuration.getChildren()[ 0 ];
        final LogTargetFactory factory = m_logTargetFactoryManager.getLogTargetFactory( config.getName() );
        final LogTarget target = factory.createTarget( config );
        final AsyncLogTarget asyncTarget;
        if( queuesize == -1 )
        {
            asyncTarget = new AsyncLogTarget( target );
        }
View Full Code Here

        {
            m_targets = new LogTarget[]{target};
        }
        else
        {
            final LogTarget oldTargets[] = m_targets;
            m_targets = new LogTarget[ oldTargets.length + 1 ];
            System.arraycopy( oldTargets, 0, m_targets, 0, oldTargets.length );
            m_targets[ m_targets.length - 1 ] = target;
        }
    }
View Full Code Here

    public void dispose()
    {
        final Iterator iterator = m_targets.iterator();
        while( iterator.hasNext() )
        {
            final LogTarget target = (LogTarget)iterator.next();
            if( target instanceof Closeable )
            {
                ( (Closeable)target ).close();
            }
        }
View Full Code Here

    public void dispose()
    {
        final Iterator iterator = m_targets.iterator();
        while( iterator.hasNext() )
        {
            final LogTarget logTarget = (LogTarget)iterator.next();
            if( logTarget instanceof Closeable )
            {
                ( (Closeable)logTarget ).close();
            }
        }
View Full Code Here

            final String priorityName = category.getAttribute( "priority" );

            final Logger logger =
                m_logkitLogger.getChildLogger( name );

            final LogTarget logTarget = (LogTarget)targets.get( target );
            if( null == target )
            {
                final String message =
                    "Unable to locate LogTarget named \"" + target +
                    "\" for Logger named \"" + name + "\".";
View Full Code Here

                final String message =
                    "Factory definition for '" + targetName +
                    "' missing from logger configuration.";
                throw new ConfigurationException( message );
            }
            final LogTarget logTarget = logTargetFactory.createTarget( confs[ i ] );
            final String targetId = confs[ i ].getAttribute( "id" );
            if( getLogger().isDebugEnabled() )
            {
                final String message = "Added new LogTarget of id " + targetId;
                getLogger().debug( message );
View Full Code Here

    public void dispose()
    {
        final Iterator iterator = m_targets.iterator();
        while( iterator.hasNext() )
        {
            final LogTarget target = (LogTarget)iterator.next();
            if( target instanceof Closeable )
            {
                ( (Closeable)target ).close();
            }
        }
View Full Code Here

    public void dispose()
    {
        final Iterator iterator = m_targets.iterator();
        while( iterator.hasNext() )
        {
            final LogTarget target = (LogTarget)iterator.next();
            if( target instanceof Closeable )
            {
                ( (Closeable)target ).close();
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.log.LogTarget

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.