data_logger: Use generator to produce samples