Package org.apache.log.output.io

Examples of org.apache.log.output.io.FileTarget


  /*
   *  make our FileTarget.  Note we are going to keep the
   *  default behavior of not appending...
   */
        FileTarget target = new FileTarget( new File( logFile),
              false,
              new VelocityFormatter("%{time} %{message}\\n%{throwable}" ) );
      
        /*
         *  use the toString() of RuntimeServices to make a unique logger
View Full Code Here


    }

    public void testFileTarget()
        throws Exception
    {
        final FileTarget target = new FileTarget( m_logFile, false, FORMATTER );

        final Logger logger = getNewLogger( target );
        logger.debug( M1 );
        logger.debug( M2 );
        logger.debug( M3 );
        target.close();

        final String data = getFileContents( m_logFile );
        assertEquals( "Targets file output", OUTPUT, data );
        assertTrue( "Deleting logfile", m_logFile.delete() );
View Full Code Here

    }

    public void testFileTarget()
        throws Exception
    {
        final FileTarget target = new FileTarget( m_logFile, false, FORMATTER );

        final Logger logger = getNewLogger( target );
        logger.debug( M1 );
        logger.debug( M2 );
        logger.debug( M3 );
        target.close();

        final String data = getFileContents( m_logFile );
        assertEquals( "Targets file output", OUTPUT, data );
        assertTrue( "Deleting logfile", m_logFile.delete() );
View Full Code Here

TOP

Related Classes of org.apache.log.output.io.FileTarget

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.