com.danielflower.apprunner.io.OutputToWriterBridge Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of app-runner Show documentation
Show all versions of app-runner Show documentation
A self-hosted platform-as-a-service that hosts web apps written in Java, Clojure, NodeJS, Python, golang and Scala.
package com.danielflower.apprunner.io;
import org.apache.maven.shared.invoker.InvocationOutputHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.Writer;
import static org.apache.commons.io.IOUtils.LINE_SEPARATOR;
public class OutputToWriterBridge implements InvocationOutputHandler, LineConsumer {
public static final Logger log = LoggerFactory.getLogger(OutputToWriterBridge.class);
private final Writer writer;
public OutputToWriterBridge(Writer writer) {
this.writer = writer;
}
public void consumeLine(String line) {
try {
writer.write(line + LINE_SEPARATOR);
writer.flush();
} catch (IOException e) {
log.info("Error while writing", e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy