Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update logging level names #1419

Merged
merged 3 commits into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions reference/config_files/conan.conf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The typical location of the **conan.conf** file is the directory ``~/.conan/``:
[log]
run_to_output = True # environment CONAN_LOG_RUN_TO_OUTPUT
run_to_file = False # environment CONAN_LOG_RUN_TO_FILE
level = 50 # environment CONAN_LOGGING_LEVEL
level = critical # environment CONAN_LOGGING_LEVEL
# trace_file = # environment CONAN_TRACE_FILE
print_run_commands = False # environment CONAN_PRINT_RUN_COMMANDS

Expand Down Expand Up @@ -89,7 +89,9 @@ Log

The ``level`` variable, defaulted to 50 (critical events), declares the LOG level .
If you want to show more detailed logging information, set this variable to lower values,
as 10 to show debug information. You can also adjust the environment variable ``CONAN_LOGGING_LEVEL``.
as 10 to show debug information, or use the level names as ``critical``, ``error``, ``warning``,
``info`` and ``debug``. You can also adjust the environment variable ``CONAN_LOGGING_LEVEL``.
The level number is related to the `Python Logging Levels`_.

The ``print_run_commands``, when is 1, Conan will print the executed commands in ``self.run`` to the output.
You can also adjust the environment variable CONAN_PRINT_RUN_COMMANDS
Expand Down Expand Up @@ -267,3 +269,5 @@ If this fails, you might also try to set environment variables:
# windows (note, no quotes here)
$ set HTTP_PROXY=http://10.10.1.10:3128
$ set HTTPS_PROXY=http://10.10.1.10:1080

.. _`Python Logging Levels`: https://docs.python.org/3/library/logging.html#logging-levels
34 changes: 31 additions & 3 deletions reference/env_vars.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,28 @@ Can be used with ``CONAN_LOG_RUN_TO_FILE`` set to ``1`` to log only to file and
CONAN_LOGGING_LEVEL
-------------------

**Defaulted to**: ``50``
**Defaulted to**: ``critical``

By default Conan logging level is only set for critical events. If you want
to show more detailed logging information, set this variable to lower values, as ``10`` to show
debug information.
to show more detailed logging information, set this variable according to
`Python Logging Levels`_ or, use a logging level name:

+---------------------+------------------+
| logging level name | logging level id |
+=====================+==================+
| critical | 50 |
+---------------------+------------------+
| error | 40 |
+---------------------+------------------+
| warning/warn | 30 |
+---------------------+------------------+
| info | 20 |
+---------------------+------------------+
| debug | 10 |
+---------------------+------------------+

Both names and IDs are acceptable by environment variable, or using the conan.conf file.


.. _env_vars_conan_login_username:

Expand Down Expand Up @@ -624,3 +641,14 @@ CONAN_SKIP_BROKEN_SYMLINKS_CHECK
**Defaulted to**: ``False``/``0``

When set to ``True``/``1``, Conan will allow the existence broken symlinks while creating a package.

CONAN_PYLINT_WERR
-----------------

**Defaulted to**: Not defined

This environment variable changes the PyLint behavior from *warning* level to *error*. Therefore,
any inconsistency found in the recipe will break the process during linter analysis.

.. _`Python Logging Levels`: https://docs.python.org/3/library/logging.html#logging-levels