Optionally save messages in files

During testing, we might want to look at the content of app creation
messages, AMPL code etc.  Specify a directory where such files can be
created and stored.

Start with `--log-dir` or set `LOGDIR` environment variable to store
received app creation messages, sent AMPL files, etc.

Set LOGDIR to /tmp/nebulous for test deployment.

Refine logging levels: output only errors and warnings by default,
and increasing levels when started with `-v`, `-vv`, `-vvv`.

Change-Id: Ie5cc770a609a0abd978bc113fb1da4dfa46873f0
This commit is contained in:
Rudi Schlatte
2024-01-24 17:08:08 +01:00
parent 4a3ee57725
commit d80c1f5ea3
8 changed files with 112 additions and 43 deletions

View File

@@ -49,7 +49,7 @@ public class LocalExecution implements Callable<Integer> {
}
NebulousApp app = NebulousApp.newFromAppMessage(msg, publisher);
if (connector != null) {
log.info("Sending AMPL to channel {}", publisher);
log.debug("Sending AMPL to channel {}", publisher);
app.sendAMPL();
}
System.out.println(AMPLGenerator.generateAMPL(app));