Package org.apache.log

Examples of org.apache.log.LogTarget


        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


            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

    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

    {
        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

        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

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.