import org.yaml.snakeyaml.Yaml;
import org.zeroturnaround.exec.ProcessExecutor;
import org.zeroturnaround.exec.StartedProcess;
-import org.zeroturnaround.exec.stream.slf4j.Slf4jStream;
+import org.zeroturnaround.exec.stream.slf4j.Slf4jDebugOutputStream;
import org.zeroturnaround.process.PidProcess;
import org.zeroturnaround.process.PidUtil;
import org.zeroturnaround.process.Processes;
StartedProcess startedProcess = new ProcessExecutor().directory(serverRoot.resolve("tileserver-mapnik").toFile()).destroyOnExit().environment(getEnv())
.command(NodeJS.executable().toString(), getTessera().toString(), "-c", getConfigJson().toString(), "-p", Integer.toString(MapsServerPreferences.defaultPort()))
- .redirectOutput(Slf4jStream.ofCaller().asDebug()).start();
+ .redirectOutput(new Slf4jDebugOutputStream(LOGGER) {
+
+ @Override
+ protected void processLine(String line) {
+ // Convert to UTF-8 string
+ String utf8Line = new String(line.getBytes(), StandardCharsets.UTF_8);
+ log.debug(utf8Line);
+ }
+ }).start();
Process nativeProcess = startedProcess.getProcess();
process = Processes.newStandardProcess(nativeProcess);