network-generator: Add logging

We stick to debug logging because in some cases network-generator
will fall back to trying another parsing function if one fails, so
if we return an error it's not necessarily a failure.
This commit is contained in:
Daan De Meyer
2024-04-04 14:46:40 +02:00
parent 19e980eb92
commit 3cb618084a
3 changed files with 90 additions and 76 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ run_network_generator() {
rm -rf "${WORK_DIR:?}"/*
stderr="$WORK_DIR/stderr"
if ! "$GENERATOR_BIN" --root "$WORK_DIR" 2>"$stderr"; then
if ! SYSTEMD_LOG_LEVEL="info" "$GENERATOR_BIN" --root "$WORK_DIR" 2>"$stderr"; then
echo >&2 "Generator failed when parsing $SYSTEMD_PROC_CMDLINE"
cat >&2 "$stderr"
return 1