aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/utils.py
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2022-10-20 16:33:01 +0200
committerCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2023-02-02 00:21:18 +0100
commitf799f1dd678cd17b59436a0c3a734135841eaa10 (patch)
treedaec6b6ce7bb7e01db9c0409ac80ca49c685a0c8 /build_scripts/utils.py
parent945424bd2e94673a465460c4c4a32b7738b912e0 (diff)
build: introduce log level
Removed the "quiet" and "verbose" older approach, and introduced a 3-level configuration so we can switch between them depending of the amount of output we need. By default, the log level is set to INFO, but it can be changed to VERBOSE and QUIET. The older "--verbose-build" and "--quiet" options were deprecated. The new way for setting the log level is: --log-level=quiet --log-level=verbose --log-level=info (default) The default option was made less verbose, controlling the output of the logging module, and cmake: for verbose it uses DEBUG, quiet uses ERROR, and no option uses INFO. Change-Id: Ida0289e3ea0ed09b7489a7513254137bba186fd0 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'build_scripts/utils.py')
-rw-r--r--build_scripts/utils.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/build_scripts/utils.py b/build_scripts/utils.py
index b95d491b7..efb53ff25 100644
--- a/build_scripts/utils.py
+++ b/build_scripts/utils.py
@@ -119,7 +119,7 @@ def copyfile(src, dst, force=True, _vars=None, force_copy_symlink=False,
log.info(f"{dst} is up to date.")
return dst
- log.info(f"Copying file\n {src} to\n {dst}.")
+ log.debug(f"Copying file\n {src} to\n {dst}.")
shutil.copy2(src, dst)
if make_writable_by_owner:
make_file_writable_by_owner(dst)
@@ -193,7 +193,7 @@ def copydir(src, dst, _filter=None, ignore=None, force=True, recursive=True, _va
f"filter={_filter}. ignore={ignore}.")
return []
- log.info(f"Copying tree\n {src} to\n {dst}. filter={_filter}. ignore={ignore}.")
+ log.debug(f"Copying tree\n {src} to\n {dst}. filter={_filter}. ignore={ignore}.")
names = os.listdir(src)
@@ -273,7 +273,7 @@ def run_process(args, initial_env=None):
No output is captured.
"""
command = " ".join([(" " in x and f'"{x}"' or x) for x in args])
- log.info(f"In directory {Path.cwd()}:\n\tRunning command: {command}")
+ log.debug(f"In directory {Path.cwd()}:\n\tRunning command: {command}")
if initial_env is None:
initial_env = os.environ
@@ -765,7 +765,7 @@ def copy_icu_libs(patchelf, destination_lib_dir):
paths = ldd_get_paths_for_dependencies(icu_regex, dependencies=dependencies)
if not paths:
raise RuntimeError("Failed to find the necessary ICU libraries required by QtCore.")
- log.info('Copying the detected ICU libraries required by QtCore.')
+ log.debug('Copying the detected ICU libraries required by QtCore.')
destination_lib_dir = Path(destination_lib_dir)
if not destination_lib_dir.exists():