xref: /openbsd-src/usr.sbin/lpd/log.h (revision e16a722a8a965b85c7889b97d3d2e0580039ade0)
1*e16a722aSderaadt /*	$OpenBSD: log.h,v 1.2 2021/12/13 18:28:40 deraadt Exp $	*/
23b188dabSeric 
33b188dabSeric /*
43b188dabSeric  * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
53b188dabSeric  *
63b188dabSeric  * Permission to use, copy, modify, and distribute this software for any
73b188dabSeric  * purpose with or without fee is hereby granted, provided that the above
83b188dabSeric  * copyright notice and this permission notice appear in all copies.
93b188dabSeric  *
103b188dabSeric  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
113b188dabSeric  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
123b188dabSeric  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
133b188dabSeric  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
143b188dabSeric  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
153b188dabSeric  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
163b188dabSeric  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
173b188dabSeric  */
183b188dabSeric 
193b188dabSeric #ifndef LOG_H
203b188dabSeric #define LOG_H
213b188dabSeric 
223b188dabSeric #include <stdarg.h>
233b188dabSeric 
243b188dabSeric void	log_init(int, int);
253b188dabSeric void	log_procinit(const char *);
263b188dabSeric void	log_setverbose(int);
273b188dabSeric int	log_getverbose(void);
283b188dabSeric void	log_warn(const char *, ...)
293b188dabSeric 	    __attribute__((__format__ (printf, 1, 2)));
303b188dabSeric void	log_warnx(const char *, ...)
313b188dabSeric 	    __attribute__((__format__ (printf, 1, 2)));
323b188dabSeric void	log_info(const char *, ...)
333b188dabSeric 	    __attribute__((__format__ (printf, 1, 2)));
343b188dabSeric void	log_debug(const char *, ...)
353b188dabSeric 	    __attribute__((__format__ (printf, 1, 2)));
363b188dabSeric void	logit(int, const char *, ...)
373b188dabSeric 	    __attribute__((__format__ (printf, 2, 3)));
383b188dabSeric void	vlog(int, const char *, va_list)
393b188dabSeric 	    __attribute__((__format__ (printf, 2, 0)));
403b188dabSeric __dead void fatal(const char *, ...)
413b188dabSeric 	    __attribute__((__format__ (printf, 1, 2)));
423b188dabSeric __dead void fatalx(const char *, ...)
433b188dabSeric 	    __attribute__((__format__ (printf, 1, 2)));
443b188dabSeric 
453b188dabSeric #endif /* LOG_H */
46