Package org.apache.log.output.io.rotate

Examples of org.apache.log.output.io.rotate.RotateStrategy


                    final String error =
                      "Missing file rotation strategy element [or|size|date|interval|time]";
                    throw new ConfigurationException( error );
                }
                final Configuration confStrategy = confRotation.getChildren()[ 0 ];
                final RotateStrategy rotateStrategy = getRotateStrategy( confStrategy );
                final FileStrategy fileStrategy = getFileStrategy( confRotation, file );

                logtarget =
                    new RotatingFileTarget( append, formatter, rotateStrategy, fileStrategy );
            }
View Full Code Here


    public void testSizeUnique()
        throws Exception
    {
        final File file = new File( "test/size-unique.log" );
        final FileStrategy fileStrategy = new UniqueFileStrategy( file );
        final RotateStrategy rotateStrategy = new RotateStrategyBySize( 128 * 1024 );
        final Logger logger = getLogger( fileStrategy, rotateStrategy );

        doTest( logger );
    }
View Full Code Here

    public void testSizeRevoling()
        throws Exception
    {
        final File file = new File( "test/size-revolve.log" );
        final FileStrategy fileStrategy = new RevolvingFileStrategy( file, 20 );
        final RotateStrategy rotateStrategy = new RotateStrategyBySize( 128 * 1024 );
        final Logger logger = getLogger( fileStrategy, rotateStrategy );

        doTest( logger );
    }
View Full Code Here

    public void testTimeUnique()
        throws Exception
    {
        final File file = new File( "test/time-unique.log" );
        final FileStrategy fileStrategy = new UniqueFileStrategy( file );
        final RotateStrategy rotateStrategy = new RotateStrategyByTime( 3 * 1000 );
        final Logger logger = getLogger( fileStrategy, rotateStrategy );

        doTest( logger );
    }
View Full Code Here

    public void testTimeRevolving()
        throws Exception
    {
        final File file = new File( "test/time-revolve.log" );
        final FileStrategy fileStrategy = new RevolvingFileStrategy( file, 5 );
        final RotateStrategy rotateStrategy = new RotateStrategyByTime( 3 * 1000 );
        final Logger logger = getLogger( fileStrategy, rotateStrategy );

        doTest( logger );
    }
View Full Code Here

                    final String error =
                      "Missing file rotation strategy element [or|size|date|interval|time]";
                    throw new ConfigurationException( error );
                }
                final Configuration confStrategy = confRotation.getChildren()[ 0 ];
                final RotateStrategy rotateStrategy = getRotateStrategy( confStrategy );
                final FileStrategy fileStrategy = getFileStrategy( confRotation, file );

                logtarget =
                    new RotatingFileTarget( append, formatter, rotateStrategy, fileStrategy );
            }
View Full Code Here

                    final String error =
                      "Missing file rotation strategy element [or|size|date|interval|time]";
                    throw new ConfigurationException( error );
                }
                final Configuration confStrategy = confRotation.getChildren()[ 0 ];
                final RotateStrategy rotateStrategy = getRotateStrategy( confStrategy );
                final FileStrategy fileStrategy = getFileStrategy( confRotation, file );

                logtarget =
                    new RotatingFileTarget( append, formatter, rotateStrategy, fileStrategy );
            }
View Full Code Here

    public void testSizeUnique()
        throws Exception
    {
        final File file = new File( "test/size-unique.log" );
        final FileStrategy fileStrategy = new UniqueFileStrategy( file );
        final RotateStrategy rotateStrategy = new RotateStrategyBySize( 128 * 1024 );
        final Logger logger = getLogger( fileStrategy, rotateStrategy );

        doTest( logger );
    }
View Full Code Here

    public void testSizeRevoling()
        throws Exception
    {
        final File file = new File( "test/size-revolve.log" );
        final FileStrategy fileStrategy = new RevolvingFileStrategy( file, 20 );
        final RotateStrategy rotateStrategy = new RotateStrategyBySize( 128 * 1024 );
        final Logger logger = getLogger( fileStrategy, rotateStrategy );

        doTest( logger );
    }
View Full Code Here

    public void testTimeUnique()
        throws Exception
    {
        final File file = new File( "test/time-unique.log" );
        final FileStrategy fileStrategy = new UniqueFileStrategy( file );
        final RotateStrategy rotateStrategy = new RotateStrategyByTime( 3 * 1000 );
        final Logger logger = getLogger( fileStrategy, rotateStrategy );

        doTest( logger );
    }
View Full Code Here

TOP

Related Classes of org.apache.log.output.io.rotate.RotateStrategy

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.