diff options
author | Colin Watson <cjwatson@debian.org> | 2011-09-06 09:45:52 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2011-09-06 09:45:52 +0100 |
commit | f38224d546cdde55f45c13d3d8225d273a3f920e (patch) | |
tree | a91a26b88ac90dc72d0ea3767feabb341eaa50a8 /log.h | |
parent | 338146a3fc257e216fe5c10fe40e6896b40d7739 (diff) | |
parent | e90790abaf031e037f444a6658e136e48577ea49 (diff) |
merge 5.9p1
Diffstat (limited to 'log.h')
-rw-r--r-- | log.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: log.h,v 1.17 2008/06/13 00:12:02 dtucker Exp $ */ | 1 | /* $OpenBSD: log.h,v 1.18 2011/06/17 21:44:30 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -46,6 +46,8 @@ typedef enum { | |||
46 | SYSLOG_LEVEL_NOT_SET = -1 | 46 | SYSLOG_LEVEL_NOT_SET = -1 |
47 | } LogLevel; | 47 | } LogLevel; |
48 | 48 | ||
49 | typedef void (log_handler_fn)(LogLevel, const char *, void *); | ||
50 | |||
49 | void log_init(char *, LogLevel, SyslogFacility, int); | 51 | void log_init(char *, LogLevel, SyslogFacility, int); |
50 | 52 | ||
51 | SyslogFacility log_facility_number(char *); | 53 | SyslogFacility log_facility_number(char *); |
@@ -64,6 +66,10 @@ void debug(const char *, ...) __attribute__((format(printf, 1, 2))); | |||
64 | void debug2(const char *, ...) __attribute__((format(printf, 1, 2))); | 66 | void debug2(const char *, ...) __attribute__((format(printf, 1, 2))); |
65 | void debug3(const char *, ...) __attribute__((format(printf, 1, 2))); | 67 | void debug3(const char *, ...) __attribute__((format(printf, 1, 2))); |
66 | 68 | ||
69 | |||
70 | void set_log_handler(log_handler_fn *, void *); | ||
71 | void do_log2(LogLevel, const char *, ...) | ||
72 | __attribute__((format(printf, 2, 3))); | ||
67 | void do_log(LogLevel, const char *, va_list); | 73 | void do_log(LogLevel, const char *, va_list); |
68 | void cleanup_exit(int) __attribute__((noreturn)); | 74 | void cleanup_exit(int) __attribute__((noreturn)); |
69 | #endif | 75 | #endif |