Skip to content

Commit 6866cfe

Browse files
committed
Add changelog fragments
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
1 parent 89b58c4 commit 6866cfe

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Fixed the log level mapping to cover the entire ``libssh`` range -- by :user:`Jakuje`.
2+
3+
Previously it was not possible to set the most verbose ``libssh`` log level
4+
``SSH_LOG_TRACE`` to get the most verbose log messages useful for debugging
5+
connection issues.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Made ``libssh`` use the Python :external+python:mod:`logging` system -- by :user:`Jakuje`.
2+
3+
Previously the underlying ``libssh`` library was writing its logs directly
4+
from the C-level into ``stderr``, which caused inconsistent behavior.
5+
6+
The default log level is now set to :data:`ANSIBLE_PYLIBSSH_TRACE`
7+
and the downstream loggers are able to trim the verbosity down.
8+
If you need performance, it is possible to disable logging on the ``libssh``
9+
side at the source by setting a lower logging value, for example:
10+
11+
.. code-block:: python
12+
13+
ssh_session.set_log_level(ANSIBLE_PYLIBSSH_NOLOG)
14+
15+
Additionally, the log level can be now be set also through the session initializer:
16+
17+
.. code-block:: python
18+
19+
ssh = Session(log_verbosity=ANSIBLE_PYLIBSSH_TRACE)
20+
21+
22+
or the ``connect()`` method arguments:
23+
24+
.. code-block:: python
25+
26+
ssh.connect(log_verbosity=ANSIBLE_PYLIBSSH_TRACE)
27+
28+
Setting any levels imported from :external+python:mod:`!logging` is also supported.

0 commit comments

Comments
 (0)