ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes);
final StreamLogger logger = new StreamLogger(inputStream, LOG, MarkerFactory.getMarker("test")) {
@Override
protected void log(Logger logger, Marker marker, String line) {
logger.info(marker, line); /* just for visual inspection */
lines.add(line);
}
};
logger.start();