com.shinesolutions.aemstackmanager.service.CollectingLogOutputStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aem-stack-manager Show documentation
Show all versions of aem-stack-manager Show documentation
Java application for managing AEM infrastructure created using aem-aws-stack-builder
The newest version!
package com.shinesolutions.aemstackmanager.service;
import org.apache.commons.exec.LogOutputStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.List;
public class CollectingLogOutputStream extends LogOutputStream {
private List lines = new ArrayList<>();
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Override
protected void processLine(String line, int logLevel) {
logger.debug(line);
lines.add(line);
}
public List getLines(){
return lines;
}
}