public synchronized void recordEvent(final String noteFormat,Object... args){
  final String note=String.format(noteFormat,args);
  final Event event=new Event(note);
  if (firstEvent == null) {
    firstEvent=event;
  }
  if (history.size() == limit) {
    history.removeFirst();
  }
  history.add(event);
}

public synchronized void recordEvent ( final String noteFormat , Object ... args ) { final String note = String . format ( noteFormat , args ) ; final Event event = new Event ( note ) ; if ( firstEvent == null ) { firstEvent = event ; } if ( history . size ( ) == limit ) { history . removeFirst ( ) ; } history . add ( event ) ; }
record an event . automatically captures the stack trace at the time this is called . the format string will be formatted and have its arguments substituted at the time this is called .
