private static TetradLoggerConfig configureLogger(Element logger){
  Elements elements=logger.getChildElements();
  List<TetradLoggerConfig.Event> events=new LinkedList<>();
  List<String> defaultLog=new LinkedList<>();
  for (int i=0; i < elements.size(); i++) {
    Element event=elements.get(i);
    String eventId=event.getAttributeValue("id");
    String description=event.getAttributeValue("description");
    String defaultOption=event.getAttributeValue("default");
    if (defaultOption != null && defaultOption.equals("on")) {
      defaultLog.add(eventId);
    }
    events.add(new DefaultTetradLoggerConfig.DefaultEvent(eventId,description));
  }
  TetradLoggerConfig config=new DefaultTetradLoggerConfig(events);
  for (  String event : defaultLog) {
    config.setEventActive(event,true);
  }
  return config;
}

private static TetradLoggerConfig configureLogger ( Element logger ) { Elements elements = logger . getChildElements ( ) ; List < TetradLoggerConfig . Event > events = new LinkedList < > ( ) ; List < String > defaultLog = new LinkedList < > ( ) ; for ( int i = 0 ; i < elements . size ( ) ; i ++ ) { Element event = elements . get ( i ) ; String eventId = event . getAttributeValue ( "id" ) ; String description = event . getAttributeValue ( "description" ) ; String defaultOption = event . getAttributeValue ( "default" ) ; if ( defaultOption != null && defaultOption . equals ( "on" ) ) { defaultLog . add ( eventId ) ; } events . add ( new DefaultTetradLoggerConfig . DefaultEvent ( eventId , description ) ) ; } TetradLoggerConfig config = new DefaultTetradLoggerConfig ( events ) ; for ( String event : defaultLog ) { config . setEventActive ( event , true ) ; } return config ; }
configures the logger that the given element represents and returns its id .
