From: Serge Rehbinder Date: Mon, 25 Jul 2016 09:39:36 +0000 (+0200) Subject: add a header to the log command X-Git-Tag: 5.0.0a0~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fd48f12baccdba974b2e405b77b67fbd07b6b383;p=tools%2Fsat.git add a header to the log command --- diff --git a/commands/log.py b/commands/log.py index 6b92609..12a87ee 100644 --- a/commands/log.py +++ b/commands/log.py @@ -19,6 +19,7 @@ import os import shutil import re +import glob # Compatibility python 2/3 for input function # input stays input for python 3 and input = raw_input for python 2 @@ -139,7 +140,13 @@ def run(args, runner, logger): # get the log directory. logDir = runner.cfg.SITE.log.log_dir - + + # Print a header + nb_files_log_dir = len(glob.glob(os.path.join(logDir, "*"))) + info = [("log directory", logDir), + ("number of log files", nb_files_log_dir)] + src.print_info(logger, info) + # If the clean options is invoked, # do nothing but deleting the concerned files. if options.clean: