Package org.apache.log

Examples of org.apache.log.LogTarget


    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 = REZ.getString( "unknown-target", target, name );
                throw new ConfigurationException( message );
            }
View Full Code Here

            if( logTargetFactory == null )
            {
                final String message = REZ.getString( "target.error.missing", targetName );
                throw new ConfigurationException( message );
            }
            final LogTarget logTarget = logTargetFactory.createTarget( confs[ i ] );
            final String targetId = confs[ i ].getAttribute( "id" );
            if( getLogger().isDebugEnabled() )
            {
                final String message = REZ.getString( "target.notice.add", 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

        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

        final Configuration confFormat = configuration.getChild( "format" );

        final Configuration confAppend = configuration.getChild( "append" );
        final boolean append = confAppend.getValueAsBoolean( false );

        final LogTarget logtarget;

        final File file = new File( filename );
        final Formatter formatter = getFormatter( confFormat );

        try
View Full Code Here

            configuration.getChild( "message", true );

        final MessageBuilder messageBuilder = getMessageBuilder( messageConf );
        final ConnectionFactory factory;
        final Destination destination;
        final LogTarget logTarget;

        try
        {
            Context ctx = new InitialContext();
            factory = (ConnectionFactory)ctx.lookup( factoryName );
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

        catch( final NamingException ne )
        {
            throw new ConfigurationException( "Cannot lookup data source", ne );
        }

        final LogTarget logTarget;
        if( normalized )
        {
            logTarget = new NormalizedJDBCTarget( dataSource, table, columns );
        }
        else
View Full Code Here

                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.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.