diff --git a/.github/workflows/bleeding-edge.yaml b/.github/workflows/bleeding-edge.yaml index 96248d2a5d7..ea8201dd87b 100644 --- a/.github/workflows/bleeding-edge.yaml +++ b/.github/workflows/bleeding-edge.yaml @@ -64,7 +64,6 @@ jobs: # to use the dev version of numpy at build time. run: uv pip install --editable .[test] --no-build-isolation - - run: yt config set --local yt log_level 50 # Disable excessive output - name: Run Tests run: uv run --no-sync pytest yt -vvv --color=yes diff --git a/doc/source/faq/index.rst b/doc/source/faq/index.rst index 732bc7f53da..70ef482f31c 100644 --- a/doc/source/faq/index.rst +++ b/doc/source/faq/index.rst @@ -402,18 +402,16 @@ environment can use readline, run the following command: How can I change yt's log level? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -yt's default log level is ``INFO``. However, you may want less voluminous logging, -especially if you are in an IPython notebook or running a long or parallel script. -On the other hand, you may want it to output a lot more, since you can't figure out -exactly what's going wrong, and you want to output some debugging information. -The default yt log level can be changed using the :ref:`configuration-file`, -either by setting it in the ``$HOME/.config/yt/yt.toml`` file: +yt's default log level is ``CRITICAL`` (50), which pratically is equivalent to "disabled". +You may want to enable logging if you are developing or debugging yt itself. +This can be done via the command line. For instance, one would enable error-level +messages as .. code-block:: bash - $ yt config set yt log_level 10 # This sets the log level to "DEBUG" + $ yt config --local set yt log_level 40 -which would produce debug (as well as info, warning, and error) messages, or at runtime: +Or, at runtime: .. code-block:: python @@ -425,8 +423,7 @@ This is the same as doing: yt.set_log_level(40) -which in this case would suppress everything below error messages. For reference, -the numerical values corresponding to different log levels are: +For reference, the numerical values corresponding to different log levels are: .. csv-table:: :header: Level, Numeric Value diff --git a/doc/source/reference/configuration.rst b/doc/source/reference/configuration.rst index 588426f8d98..772a42651ba 100644 --- a/doc/source/reference/configuration.rst +++ b/doc/source/reference/configuration.rst @@ -100,7 +100,7 @@ Here is an example script, where we adjust the logging at startup: This has the same effect as setting ``log_level = 1`` in the configuration file. Note that a log level of 1 means that all log messages are printed to -stdout. To disable logging, set the log level to 50. +stdout. .. _config-options: diff --git a/tests/ci_install.sh b/tests/ci_install.sh index ae7b97e83e5..9ab2fbff446 100644 --- a/tests/ci_install.sh +++ b/tests/ci_install.sh @@ -20,8 +20,4 @@ fi # but the primary intention is to embed this script in CI jobs uv sync --extra=test ${sync_args} -# Disable excessive output -uv run --no-sync yt config set --local yt log_level 50 -cat yt.toml - set +x diff --git a/yt/config.py b/yt/config.py index 8ae7364145b..7df95994c67 100644 --- a/yt/config.py +++ b/yt/config.py @@ -11,7 +11,9 @@ "colored_logs": False, "suppress_stream_logging": False, "stdout_stream_logging": False, - "log_level": 20, + # 50=CRITICAL practically represents *no logging* + # because critical errors are normally reported as show-stopping exceptions + "log_level": 50, "inline": False, "num_threads": -1, "store_parameter_files": False, diff --git a/yt/data_objects/tests/test_ellipsoid.py b/yt/data_objects/tests/test_ellipsoid.py index 73f9d19a02d..806eaa715ce 100644 --- a/yt/data_objects/tests/test_ellipsoid.py +++ b/yt/data_objects/tests/test_ellipsoid.py @@ -7,7 +7,6 @@ def setup_module(): from yt.config import ytcfg - ytcfg["yt", "log_level"] = 50 ytcfg["yt", "internals", "within_testing"] = True