mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-09-10 02:09:25 +03:00
log: add ssh_vlog to save the stack space
and add LOG_SIZE macro to control the buffer size Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Change-Id: I3eaeea001fc531fdb55074fc3a9d140b27847c1f
This commit is contained in:
@@ -49,6 +49,8 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* Visual Studio hasn't inttypes.h so it doesn't know uint32_t */
|
||||
typedef int int32_t;
|
||||
@@ -587,6 +589,10 @@ LIBSSH_API int ssh_set_log_level(int level);
|
||||
LIBSSH_API int ssh_get_log_level(void);
|
||||
LIBSSH_API void *ssh_get_log_userdata(void);
|
||||
LIBSSH_API int ssh_set_log_userdata(void *data);
|
||||
LIBSSH_API void ssh_vlog(int verbosity,
|
||||
const char *function,
|
||||
const char *format,
|
||||
va_list *va) PRINTF_ATTRIBUTE(3, 0);
|
||||
LIBSSH_API void _ssh_log(int verbosity,
|
||||
const char *function,
|
||||
const char *format, ...) PRINTF_ATTRIBUTE(3, 4);
|
||||
|
Reference in New Issue
Block a user