Examples of RotateStrategyByDate


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

            return new RotateStrategyBySize( size );
        }
        else if( "date".equals( type ) )
        {
            final String value = conf.getValue( "yyyyMMdd" );
            return new RotateStrategyByDate( value );
        }
        else if( "interval".equals( type ) )
        {
            // default rotate strategy
            final String value = conf.getValue( "24:00:00" );
View Full Code Here

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

                //   open file target in append mode
                final File appfile = new File(prop.getProperty("logs.dir")
                        + File.separator + IConst.LOG.APPLICATION_LOG_NAME);

                appLoggerTargets[1] = new RotatingFileTarget(true,
                        appformatter, new RotateStrategyByDate(),
                        new UniqueFileStrategy(appfile, ".yyyy-MM-dd", ".log"));
            }
            //Set log targets of logger
            appLogger.setLogTargets(appLoggerTargets);

            //*************************** create and configure audit logger

            auditLogger = Hierarchy.getDefaultHierarchy().getLoggerFor(
                    IConst.LOG.AUDIT_LOG_NAME);
            auditLogger.setPriority(Priority.INFO);
            final PatternFormatter auditformatter = new PatternFormatter(prop
                    .getProperty("logs.pattern.audit"));

            LogTarget[] auditLoggerTargets = new LogTarget[writeToFile ? 2 : 1];
            //          create JDBC target
            InitialContext ic = new InitialContext();
            DataSource ds = (DataSource) ic.lookup("jgossip_db");

            auditLoggerTargets[0] = new DefaultJDBCTarget(ds,
                    IConst.LOG.LOG_TABLE, IConst.LOG.LOG_COLUMNS);
            if (writeToFile) {
                //              open file target in append mode

                final File auditfile = new File(prop.getProperty("logs.dir")
                        + File.separator + IConst.LOG.AUDIT_LOG_NAME);

                auditLoggerTargets[1] = new RotatingFileTarget(
                        true,
                        auditformatter,
                        new RotateStrategyByDate(),
                        new UniqueFileStrategy(auditfile, ".yyyy-MM-dd", ".log"));
            }

            //Set log targets of logger
            auditLogger.setLogTargets(auditLoggerTargets);
View Full Code Here

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

            return new RotateStrategyBySize( size );
        }
        else if( "date".equals( type ) )
        {
            final String value = conf.getValue( "yyyyMMdd" );
            return new RotateStrategyByDate( value );
        }
        else if( "interval".equals( type ) )
        {
            // default rotate strategy
            final String value = conf.getValue( "24:00:00" );
View Full Code Here

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

            return new RotateStrategyBySize( size );
        }
        else if( "date".equals( type ) )
        {
            final String value = conf.getValue( "yyyyMMdd" );
            return new RotateStrategyByDate( value );
        }
        else if( "interval".equals( type ) )
        {
            // default rotate strategy
            final String value = conf.getValue( "24:00:00" );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.