1*2aa5774dSbluhm /* $OpenBSD: log.h,v 1.2 2017/03/13 21:20:56 bluhm Exp $ */ 2*2aa5774dSbluhm 3b034567aSjca /* 4b034567aSjca * Copyright (c) 20083, 2004 Henning Brauer <henning@openbsd.org> 5b034567aSjca * 6b034567aSjca * Permission to use, copy, modify, and distribute this software for any 7b034567aSjca * purpose with or without fee is hereby granted, provided that the above 8b034567aSjca * copyright notice and this permission notice appear in all copies. 9b034567aSjca * 10b034567aSjca * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11b034567aSjca * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12b034567aSjca * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13b034567aSjca * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14b034567aSjca * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15b034567aSjca * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16b034567aSjca * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17b034567aSjca */ 18b034567aSjca 19b034567aSjca #include <stdarg.h> 20b034567aSjca 21b034567aSjca void log_init(int); 22b034567aSjca void logit(int pri, const char *fmt, ...); 23b034567aSjca 24b034567aSjca __dead void fatal(const char*); 25b034567aSjca __dead void fatalx(const char*); 26b034567aSjca 27b034567aSjca void log_warn(const char*, ...) __attribute__((format(printf, 1, 2))); 28b034567aSjca void log_warnx(const char*, ...) __attribute__((format(printf, 1, 2))); 29b034567aSjca void log_info(const char*, ...) __attribute__((format(printf, 1, 2))); 30b034567aSjca void log_debug(const char*, ...) __attribute__((format(printf, 1, 2))); 31b034567aSjca void log_enqueue(const char*, ...) __attribute__((format(printf, 1, 2))); 32