diff options
| author | Cristián Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2022-10-20 16:33:01 +0200 |
|---|---|---|
| committer | Cristián Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2023-02-02 00:21:18 +0100 |
| commit | f799f1dd678cd17b59436a0c3a734135841eaa10 (patch) | |
| tree | daec6b6ce7bb7e01db9c0409ac80ca49c685a0c8 /build_scripts/config.py | |
| parent | 945424bd2e94673a465460c4c4a32b7738b912e0 (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/config.py')
| -rw-r--r-- | build_scripts/config.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/build_scripts/config.py b/build_scripts/config.py index 3f63f842a..f13ed0482 100644 --- a/build_scripts/config.py +++ b/build_scripts/config.py @@ -1,7 +1,7 @@ # Copyright (C) 2018 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -from .log import log +from .log import log, LogLevel from pathlib import Path from . import PYSIDE, PYSIDE_MODULE, SHIBOKEN @@ -77,7 +77,7 @@ class Config(object): ext_modules=None, setup_script_dir=None, cmake_toolchain_file=None, - quiet=False, + log_level=LogLevel.INFO, qt_install_path: Path = None): """ Sets up the global singleton config which is used in many parts @@ -117,7 +117,7 @@ class Config(object): setup_kwargs['version'] = package_version setup_kwargs['python_requires'] = ">=3.7, <3.12" - if quiet: + if log_level == LogLevel.QUIET: # Tells distutils / setuptools to be quiet, and only print warnings or errors. # Makes way less noise in the terminal when building. setup_kwargs['verbose'] = 0 |
