mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 10:40:28 +09: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:
@@ -369,13 +369,11 @@ public:
|
||||
return state;
|
||||
}
|
||||
void log(int priority, const char *format, ...){
|
||||
char buffer[1024];
|
||||
va_list va;
|
||||
|
||||
va_start(va, format);
|
||||
vsnprintf(buffer, sizeof(buffer), format, va);
|
||||
ssh_vlog(priority, "libsshpp", format, &va);
|
||||
va_end(va);
|
||||
_ssh_log(priority, "libsshpp", "%s", buffer);
|
||||
}
|
||||
|
||||
/** @brief copies options from a session to another
|
||||
|
||||
Reference in New Issue
Block a user