question: private void configureOutputStream ( ) { String filename = generateFilename ( ) ; File file = null ; try { file = acquireUniqueFile ( filename ) ; if ( isDebuggable ( Level . CONFIG ) ) { LogHelper . println ( "com.gigaspaces.logger" , Level . CONFIG , "Log file: " + file . getAbsolutePath ( ) ) ; } FileOutputStream fout = new FileOutputStream ( file , append ) ; BufferedOutputStream bout = new BufferedOutputStream ( fout ) ; MeteredStream meteredStream = new MeteredStream ( bout , ( int ) file . length ( ) ) ; setOutputStream ( meteredStream ) ; sizeRollingPolicy . setMeteredStream ( meteredStream ) ; timeRollingPolicy . setTimestamp ( ) ; backupPolicy . track ( file ) ; if ( monitorCreatedFiles ) { filesCreated . add ( 0 , file ) ; } } catch ( IOException ioe ) { String filepath = file != null ? file . getAbsolutePath ( ) : filename ; reportError ( "Failed while configuring output file: " + filepath , ioe , ErrorManager . OPEN_FAILURE ) ; corruptedOutputStream = true ; } }
target:  Configure the output stream to use: 1. generate a filename 2. acquire a unique file (if a filename by this name already exists) 3. open a stream 4. set the policies to monitor this stream