xref: /openbsd-src/usr.sbin/eigrpd/log.h (revision e16a722a8a965b85c7889b97d3d2e0580039ade0)
1*e16a722aSderaadt /*	$OpenBSD: log.h,v 1.6 2021/12/13 18:28:40 deraadt Exp $ */
243509a12Srenato 
343509a12Srenato /*
443509a12Srenato  * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
543509a12Srenato  *
643509a12Srenato  * Permission to use, copy, modify, and distribute this software for any
743509a12Srenato  * purpose with or without fee is hereby granted, provided that the above
843509a12Srenato  * copyright notice and this permission notice appear in all copies.
943509a12Srenato  *
1043509a12Srenato  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1143509a12Srenato  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1243509a12Srenato  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1343509a12Srenato  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1443509a12Srenato  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1543509a12Srenato  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1643509a12Srenato  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1743509a12Srenato  */
1843509a12Srenato 
19fcdf914bSbenno #ifndef LOG_H
20fcdf914bSbenno #define LOG_H
2143509a12Srenato 
2243509a12Srenato #include <stdarg.h>
23fcdf914bSbenno 
24fcdf914bSbenno extern const char	*log_procname;
2543509a12Srenato 
2643509a12Srenato void	 log_init(int);
2743509a12Srenato void	 log_verbose(int);
283d8a8be3Sbenno void	 logit(int, const char *, ...)
293d8a8be3Sbenno 		__attribute__((__format__ (printf, 2, 3)));
303d8a8be3Sbenno void	 vlog(int, const char *, va_list)
313d8a8be3Sbenno 		__attribute__((__format__ (printf, 2, 0)));
323d8a8be3Sbenno void	 log_warn(const char *, ...)
333d8a8be3Sbenno 		__attribute__((__format__ (printf, 1, 2)));
343d8a8be3Sbenno void	 log_warnx(const char *, ...)
353d8a8be3Sbenno 		__attribute__((__format__ (printf, 1, 2)));
363d8a8be3Sbenno void	 log_info(const char *, ...)
373d8a8be3Sbenno 		__attribute__((__format__ (printf, 1, 2)));
383d8a8be3Sbenno void	 log_debug(const char *, ...)
393d8a8be3Sbenno 		__attribute__((__format__ (printf, 1, 2)));
403d8a8be3Sbenno void	 fatal(const char *) __dead
413d8a8be3Sbenno 		__attribute__((__format__ (printf, 1, 0)));
423d8a8be3Sbenno void	 fatalx(const char *) __dead
433d8a8be3Sbenno 		__attribute__((__format__ (printf, 1, 0)));
4443509a12Srenato 
45fcdf914bSbenno #endif /* LOG_H */
46