This is a patch that would slightly enhance readability of controller log.
First change is addition of a missing log entry when recipes are passed as
individual files.
Second change is modification of the log entry so it's obvious that
another recipe's being processed.
Before,
# ./lnst-ctl run recipes/team/
Loading config file '/root/lnst/lnst-ctl.conf'
Loading config file '/root/.lnst/lnst-ctl.conf'
2013-11-20 09:12:17 (localhost) INFO: Processing recipe file
"recipes/team/recipex_ab_001.xml"
2013-11-20 09:12:17 (localhost) INFO: Checking machine pool availability.
...
After,
# ./lnst-ctl run recipes/team/
Loading config file '/root/lnst/lnst-ctl.conf'
Loading config file '/root/.lnst/lnst-ctl.conf'
2013-11-20 09:14:43 (localhost) INFO:
--------------------------------------------------------
Processing recipe file "recipes/team/recipex_ab_001.xml"
--------------------------------------------------------
2013-11-20 09:14:43 (localhost) INFO: Checking machine pool availability.
...
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst-ctl | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lnst-ctl b/lnst-ctl
index d597c23..ad27cc0 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -213,7 +213,11 @@ def main():
for f in all_files:
recipe_file = os.path.join(recipe_path, f)
if re.match(r'^.*\.xml$', recipe_file):
- logging.info("Processing recipe file \"%s\"" %
recipe_file)
+ head_str = "\nProcessing recipe file \"%s\"\n" %
\
+ recipe_file
+ logging.info("-" * len(head_str.strip())
+ + head_str\
+ + "-" * len(head_str.strip()))
fp, res, rv = get_recipe_result(action, recipe_file,
res_serializer,
packet_capture,
@@ -221,6 +225,10 @@ def main():
defined_aliases,
overriden_aliases)
else:
+ head_str = "\nProcessing recipe file \"%s\"\n" %
recipe_path
+ logging.info("-" * len(head_str.strip())
+ + head_str\
+ + "-" * len(head_str.strip()))
fp, res, rv = get_recipe_result(action, recipe_path,
res_serializer,
packet_capture,
--
1.8.1.4
Show replies by date