diff options
Diffstat (limited to 'log.h')
-rw-r--r-- | log.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: log.h,v 1.20 2013/04/07 02:10:33 dtucker Exp $ */ +/* $OpenBSD: log.h,v 1.24 2019/09/06 04:53:27 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -15,6 +15,8 @@ #ifndef SSH_LOG_H #define SSH_LOG_H +#include <stdarg.h> /* va_list */ + /* Supported syslog facilities and levels. */ typedef enum { SYSLOG_FACILITY_DAEMON, @@ -49,7 +51,8 @@ typedef enum { typedef void (log_handler_fn)(LogLevel, const char *, void *); void log_init(char *, LogLevel, SyslogFacility, int); -void log_change_level(LogLevel); +LogLevel log_level_get(void); +int log_change_level(LogLevel); int log_is_on_stderr(void); void log_redirect_stderr_to(const char *); @@ -63,6 +66,8 @@ void fatal(const char *, ...) __attribute__((noreturn)) void error(const char *, ...) __attribute__((format(printf, 1, 2))); void sigdie(const char *, ...) __attribute__((noreturn)) __attribute__((format(printf, 1, 2))); +void logdie(const char *, ...) __attribute__((noreturn)) + __attribute__((format(printf, 1, 2))); void logit(const char *, ...) __attribute__((format(printf, 1, 2))); void verbose(const char *, ...) __attribute__((format(printf, 1, 2))); void debug(const char *, ...) __attribute__((format(printf, 1, 2))); |