@Override public void flush(){
  FlushTask task;
synchronized (logRecords) {
    task=new FlushTask(new ArrayList<String>(logRecords));
    logRecords.clear();
  }
  task.run();
}

@ Override public void flush ( ) { FlushTask task ; synchronized ( logRecords ) { task = new FlushTask ( new ArrayList < String > ( logRecords ) ) ; logRecords . clear ( ) ; } task . run ( ) ; }
flushes the buffered logrecords .
