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