1 files changed, 10 insertions, 0 deletions
diff --git a/LibSystemdCli/CommandExecutor.cs b/LibSystemdCli/CommandExecutor.cs
index 096f1c1..8a21bc5 100644
--- a/LibSystemdCli/CommandExecutor.cs
+++ b/LibSystemdCli/CommandExecutor.cs
@@ -27,6 +27,16 @@ public class CommandExecutor
throw new Exception($"Command {command} {args} failed with exit code {process.ExitCode} and error: {error}");
}
+ if (string.IsNullOrWhiteSpace(output))
+ {
+ Console.WriteLine($"[{DateTime.Now:O}] Command {command} {args} produced no output.");
+ }
+
+ if (!string.IsNullOrWhiteSpace(error))
+ {
+ Console.WriteLine($"[{DateTime.Now:O}] Command {command} {args} produced error output: {error}");
+ }
+
return output;
}
|