diff options
Diffstat (limited to 'src/log.c')
-rw-r--r-- | src/log.c | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -136,16 +136,20 @@ void ssh_log_function(ssh_session session, * @param verbosity The verbosity of the event. * @param format The format string of the log entry. */ -void ssh_log_common(struct ssh_common_struct *common, int verbosity, const char *format, ...){ - char buffer[1024]; - va_list va; - - if (verbosity <= common->log_verbosity) { - va_start(va, format); - vsnprintf(buffer, sizeof(buffer), format, va); - va_end(va); - do_ssh_log(common, verbosity, "common", buffer); - } +void ssh_log_common(struct ssh_common_struct *common, + int verbosity, + const char *function, + const char *format, ...) +{ + char buffer[1024]; + va_list va; + + if (verbosity <= common->log_verbosity) { + va_start(va, format); + vsnprintf(buffer, sizeof(buffer), format, va); + va_end(va); + do_ssh_log(common, verbosity, function, buffer); + } } /** @} */ |