1*e16a722aSderaadt /* $OpenBSD: log.h,v 1.2 2021/12/13 18:28:40 deraadt Exp $ */ 253293e44Sflorian 353293e44Sflorian /* 453293e44Sflorian * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> 553293e44Sflorian * 653293e44Sflorian * Permission to use, copy, modify, and distribute this software for any 753293e44Sflorian * purpose with or without fee is hereby granted, provided that the above 853293e44Sflorian * copyright notice and this permission notice appear in all copies. 953293e44Sflorian * 1053293e44Sflorian * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1153293e44Sflorian * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1253293e44Sflorian * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1353293e44Sflorian * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1453293e44Sflorian * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1553293e44Sflorian * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1653293e44Sflorian * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1753293e44Sflorian */ 1853293e44Sflorian 1953293e44Sflorian #ifndef LOG_H 2053293e44Sflorian #define LOG_H 2153293e44Sflorian 2253293e44Sflorian #include <stdarg.h> 2353293e44Sflorian 2453293e44Sflorian void log_init(int, int); 2553293e44Sflorian void log_procinit(const char *); 2653293e44Sflorian void log_setverbose(int); 2753293e44Sflorian int log_getverbose(void); 2853293e44Sflorian void log_warn(const char *, ...) 2953293e44Sflorian __attribute__((__format__ (printf, 1, 2))); 3053293e44Sflorian void log_warnx(const char *, ...) 3153293e44Sflorian __attribute__((__format__ (printf, 1, 2))); 3253293e44Sflorian void log_info(const char *, ...) 3353293e44Sflorian __attribute__((__format__ (printf, 1, 2))); 3453293e44Sflorian void log_debug(const char *, ...) 3553293e44Sflorian __attribute__((__format__ (printf, 1, 2))); 3653293e44Sflorian void logit(int, const char *, ...) 3753293e44Sflorian __attribute__((__format__ (printf, 2, 3))); 3853293e44Sflorian void vlog(int, const char *, va_list) 3953293e44Sflorian __attribute__((__format__ (printf, 2, 0))); 4053293e44Sflorian __dead void fatal(const char *, ...) 4153293e44Sflorian __attribute__((__format__ (printf, 1, 2))); 4253293e44Sflorian __dead void fatalx(const char *, ...) 4353293e44Sflorian __attribute__((__format__ (printf, 1, 2))); 4453293e44Sflorian 4553293e44Sflorian #endif /* LOG_H */ 46