Clean up ACLs
[python_utils.git] / bootstrap.py
index d1233e9344f54be3f84555a9b392faf1d5fe2054..0d37dcbd7215067ad17801e48e8eafab64c63c61 100644 (file)
@@ -47,7 +47,8 @@ def initialize(funct):
         sys.excepthook = handle_uncaught_exception
         config.parse()
         logging_utils.initialize_logging(logging.getLogger())
-        logger.debug(f"About to invoke {funct}...")
+        config.late_logging()
+        logger.debug(f'Starting {funct.__name__}')
         start = time.perf_counter()
         ret = funct(*args, **kwargs)
         end = time.perf_counter()
@@ -59,6 +60,9 @@ def initialize(funct):
                      f'child system: {cstime}s\n'
                      f'elapsed: {elapsed_time}s\n'
                      f'walltime: {end - start}s\n')
-        logger.info(f'Exit {ret}')
+        if ret != 0:
+            logger.info(f'Exit {ret}')
+        else:
+            logger.debug(f'Exit {ret}')
         sys.exit(ret)
     return initialize_wrapper