Package org.apache.log

Examples of org.apache.log.LogTarget


        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


        throws ConfigurationException
    {
        final Configuration confFormat = configuration.getChild( "format" );
        final Formatter formatter = getFormatter( confFormat );

        final LogTarget logtarget = new StreamTarget(System.out, formatter);

        return logtarget;
    }
View Full Code Here

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

    {
        final Configuration confFilename = configuration.getChild( "filename" );
        final String filename = getFilename( confFilename.getValue() );
        final File file = new File( filename );

        final LogTarget logtarget = createTarget( file, configuration );
        return logtarget;
    }
View Full Code Here

        final boolean append = confAppend.getValueAsBoolean( false );

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

        final LogTarget logtarget;
        try
        {
            final Configuration confRotation = configuration.getChild( "rotation", false );
            if( null == confRotation )
            {
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

        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

            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

        target.setFilename( logPath );
        target.setFormatter(new VelocityFormatter());
        target.setFormat("%{time} %{message}\\n%{throwable}" );
       
        LogTarget logTargets[] = null;
               
        if ( null != target )
        {
            logTargets = new LogTarget[] { target };
        }           
View Full Code Here

        ProxoolFacade.removeConnectionPool("avalon-test-ns-2");
    }

    private void initializeAvalon(String roleFile, String componentFile) throws Exception {
        // create a Avalon logger
        final LogTarget logTarget = new LogKitTargetAdapter();
        final Logger rootLogger = Hierarchy.getDefaultHierarchy().getLoggerFor("root");
        rootLogger.unsetLogTargets();
        rootLogger.setLogTargets(new LogTarget[]{logTarget});
        rootLogger.setPriority(Priority.WARN);
        final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(true);
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.