1 /* $OpenBSD: log.h,v 1.2 2019/03/31 03:53:42 yasuoka Exp $ */ 2 3 #ifndef _LOG_H 4 #define _LOG_H 1 5 6 #include <sys/cdefs.h> 7 #include <stdarg.h> /* for va_list */ 8 9 extern int log_debug_use_syslog; 10 11 __BEGIN_DECLS 12 void log_init (int); 13 void logit(int, const char *, ...) 14 __attribute__((__format__ (__syslog__, 2, 3))); 15 void vlog(int, const char *, va_list) 16 __attribute__((__format__ (__syslog__, 2, 0))); 17 void log_warn(const char *, ...) 18 __attribute__((__format__ (printf, 1, 2))); 19 void log_warnx(const char *, ...) 20 __attribute__((__format__ (printf, 1, 2))); 21 void log_info(const char *, ...) 22 __attribute__((__format__ (printf, 1, 2))); 23 void log_debug(const char *, ...) 24 __attribute__((__format__ (printf, 1, 2))); 25 __dead void fatal(const char *); 26 __dead void fatalx(const char *); 27 __END_DECLS 28 29 #endif 30