consider verbose
This commit is contained in:
parent
1911edc49e
commit
59bf7d65a0
@ -22,7 +22,7 @@ public class MbusMaster {
|
||||
logger.debug("Configuration loaded");
|
||||
*/
|
||||
|
||||
MbusgwChild mbusgw = new MbusgwChild(true);
|
||||
MbusgwChild mbusgw = new MbusgwChild(false);
|
||||
mbusgw.start();
|
||||
|
||||
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user