consider verbose

This commit is contained in:
Wolfgang Hottgenroth 2020-09-02 18:08:25 +02:00
parent 1911edc49e
commit 59bf7d65a0
Signed by: wn
GPG Key ID: B586EAFCDF2F65F4
3 changed files with 10 additions and 3 deletions

View File

@ -22,7 +22,7 @@ public class MbusMaster {
logger.debug("Configuration loaded");
*/
MbusgwChild mbusgw = new MbusgwChild(true);
MbusgwChild mbusgw = new MbusgwChild(false);
mbusgw.start();

View File

@ -7,6 +7,7 @@ import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Properties;
import org.apache.logging.log4j.LogManager;
@ -31,7 +32,13 @@ public class MbusgwChild {
public void start() throws IOException {
logger.info("InterfaceChild starting");
ProcessBuilder pb = new ProcessBuilder("/usr/local/bin/mbusgw", "-l", "-v");
ArrayList<String> arguments = new ArrayList<>();
arguments.add("/usr/local/bin/mbusgw");
arguments.add("-l");
if (this.verbose) {
arguments.add("-v");
}
ProcessBuilder pb = new ProcessBuilder(arguments);
this.mbusgwProcess = pb.start();
logger.debug("Process started");

View File

@ -4,7 +4,7 @@
<Console name="ConsoleAppender" target="SYSTEM_OUT">
<PatternLayout pattern="%d [%t, %F, %L] %-5level - %msg%n%throwable"/>
</Console>
<File name="FileAppender" fileName="/tmp/mqttMBusConverter.log">
<File name="FileAppender" fileName="/tmp/mbusmaster.log">
<PatternLayout pattern="%d [%t, %F, %L] %-5level - %msg%n%throwable"/>
</File>
</Appenders>