public void replaceLogCleaner( final int maxLogTimeoutMinutes ) { KettleLogStore.getInstance().replaceLogCleaner( maxLogTimeoutMinutes ); }
/** * Initialize the central log store. If it has already been initialized the configuration will be updated. * * @param maxSize * the maximum size of the log buffer * @param maxLogTimeoutMinutes * The maximum time that a log line times out in minutes */ private static synchronized void init0( int maxSize, int maxLogTimeoutMinutes, boolean redirectStdOut, boolean redirectStdErr ) { if ( store != null ) { // CentralLogStore already initialized. Just update the values. store.appender.setMaxNrLines( maxSize ); store.replaceLogCleaner( maxLogTimeoutMinutes ); } else { store = new KettleLogStore( maxSize, maxLogTimeoutMinutes, redirectStdOut, redirectStdErr ); } initialized.set( true ); }
/** * Create the central log store with optional limitation to the size * * @param maxSize * the maximum size * @param maxLogTimeoutMinutes * The maximum time that a log line times out in Minutes. */ private KettleLogStore( int maxSize, int maxLogTimeoutMinutes, boolean redirectStdOut, boolean redirectStdErr ) { this.appender = new LoggingBuffer( maxSize ); replaceLogCleaner( maxLogTimeoutMinutes ); if ( redirectStdOut ) { System.setOut( new LoggingPrintStream( OriginalSystemOut ) ); } if ( redirectStdErr ) { System.setErr( new LoggingPrintStream( OriginalSystemErr ) ); } }