]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
add a header to the log command
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Mon, 25 Jul 2016 09:39:36 +0000 (11:39 +0200)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Mon, 25 Jul 2016 09:39:36 +0000 (11:39 +0200)
commands/log.py

index 6b92609027b3a1f88a359884ec61de19974ae301..12a87ee34bb71c6eb2f079d76c95c38c950c9c08 100644 (file)
@@ -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: