And also between each new recipe execution
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst-ctl | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/lnst-ctl b/lnst-ctl
index 947f3ad..799ebd6 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -94,7 +94,8 @@ def get_recipe_result(action, file_path, log_ctl, res_serializer,
no_match = False
log_ctl.set_recipe(file_path, expand="match_%d" % matches)
- recipe_head_log_entry(file_path, matches)
+ log_dir = log_ctl.get_recipe_log_path()
+ recipe_head_log_entry(file_path, log_dir, matches)
res_serializer.add_recipe(file_path, matches)
res = {}
@@ -133,7 +134,7 @@ def get_recipe_result(action, file_path, log_ctl, res_serializer,
try:
nettestctl.provision_machines()
log_ctl.set_recipe(file_path, expand="match_%d" % matches)
- recipe_head_log_entry(file_path, matches)
+ recipe_head_log_entry(file_path, log_dir, matches)
res_serializer.add_recipe(file_path, matches)
nettestctl.print_match_description()
res = exec_action(action, nettestctl)
@@ -165,11 +166,13 @@ def get_recipe_result(action, file_path, log_ctl, res_serializer,
return retval
-def recipe_head_log_entry(filename, match_num=1):
+def recipe_head_log_entry(filename, log_dir, match_num=1):
head_str = "\nTrying recipe file \"%s\" match %d\n" % (filename,
match_num)
+ log_dir_str = "Logs for this recipe will be stored in '%s'\n" %
log_dir
logging.info("-" * len(head_str.strip())
+ head_str
+ + log_dir_str
+ "-" * len(head_str.strip()))
def main():
@@ -334,6 +337,8 @@ def main():
res_serializer.print_summary()
+ log_ctl.print_log_dir()
+
if result_path:
result_path = os.path.expanduser(result_path)
handle = open(result_path, "w")
--
2.4.3