File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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.
Original file line number Diff line number Diff line change 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.
You can’t perform that action at this time.
0 commit comments