diff options
author | John Thacker <johnthacker@gmail.com> | 2024-01-18 21:19:08 -0500 |
---|---|---|
committer | John Thacker <johnthacker@gmail.com> | 2024-01-19 20:59:33 +0000 |
commit | 6d39c511fbf74d6752e21c38cfef65574ff2d668 (patch) | |
tree | fc636ec936354d3b99dc1c3a680aaf4a981f4acf /extcap/ssh-base.h | |
parent | 55214bdacdda8579fe1aa47a1b698c88756efb43 (diff) |
extcap: Set matching libssh log level
Instead of always setting the libssh log level to SSH_LOG_INFO
when an extcap has a ws log level of LOG_LEVEL_DEBUG or lower,
set the libssh log level to a corresponding log level
(NOISY/TRACE, DEBUG/DEBUG, INFO/INFO, MESSAGE and above/WARN).
Format the libssh logging messages more similar to our normal
logging messages, with a libssh domain and using the libssh
priority.
Prior to 0.11.0 (that is, this commit:
https://gitlab.com/libssh/libssh-mirror/-/commit/657d9143d121dfff74f5a63f734d0096c7f37194
) libssh sends some merely informational messages at their WARN
level, so lower that down to INFO, which isn't printed by default
and doesn't get printed in the GUI.
Related to #17888
Diffstat (limited to 'extcap/ssh-base.h')
-rw-r--r-- | extcap/ssh-base.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/extcap/ssh-base.h b/extcap/ssh-base.h index 9ac592300c..7a30b493e9 100644 --- a/extcap/ssh-base.h +++ b/extcap/ssh-base.h @@ -50,7 +50,7 @@ typedef struct _ssh_params { char* sshkey_passphrase; char* proxycommand; bool ssh_sha1; - bool debug; + int debug; } ssh_params_t; /* Add libssh version information to an extcap_parameters structure */ @@ -71,6 +71,9 @@ ssh_params_t* ssh_params_new(void); /* Clean the ssh params */ void ssh_params_free(ssh_params_t* ssh_params); +/* Sets the libssh log level to match the ws log level */ +void ssh_params_set_log_level(ssh_params_t* ssh_params, enum ws_log_level level); + #endif /* |