Skip to content

Commit 24322de

Browse files
committed
session: Add log_verbosity option to kwargs constructor
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
1 parent 353db99 commit 24322de

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/pylibsshext/session.pyx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ OPTS_MAP = {
4141
"gssapi_server_identity": libssh.SSH_OPTIONS_GSSAPI_SERVER_IDENTITY,
4242
"gssapi_client_identity": libssh.SSH_OPTIONS_GSSAPI_CLIENT_IDENTITY,
4343
"gssapi_delegate_credentials": libssh.SSH_OPTIONS_GSSAPI_DELEGATE_CREDENTIALS,
44+
"log_verbosity": libssh.SSH_OPTIONS_LOG_VERBOSITY,
4445
}
4546
OPTS_DIR_MAP = {
4647
"ssh_dir": libssh.SSH_OPTIONS_SSH_DIR,
@@ -165,7 +166,7 @@ cdef class Session(object):
165166
key_m = OPTS_MAP[key]
166167
else:
167168
raise LibsshSessionException("Unknown attribute name [%s]" % key)
168-
if key in ("fd", "gssapi_delegate_credentials"):
169+
if key in ("fd", "gssapi_delegate_credentials", "log_verbosity"):
169170
value_int = value
170171
libssh.ssh_options_set(self._libssh_session, key_m, &value_int)
171172
elif key == "port":
@@ -248,6 +249,10 @@ cdef class Session(object):
248249
:param proxycommand: The proxycommand use to setup a ssh connection using
249250
jumphost
250251
:type proxycommand: str
252+
253+
:param log_verbosity: The log level to set filtering on source. Possible values are data:`ANSIBLE_PYLIBSSH_NOLOG`, `logging.DEBUG`,
254+
`logging.INFO`, `logging.WARNING`, :data:`ANSIBLE_PYLIBSSH_NOLOG`.
255+
:type log_verbosity: int
251256
"""
252257
cdef LibsshSessionException saved_exception = None
253258

0 commit comments

Comments
 (0)