2023-02-08 13:17:09 +01:00
|
|
|
// SPDX-License-Identifier: ISC
|
2016-03-01 19:27:36 +01:00
|
|
|
/* $OpenBSD$ */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
|
|
|
|
*/
|
|
|
|
|
2017-04-18 17:04:44 +02:00
|
|
|
#ifndef LOG_H
|
|
|
|
#define LOG_H
|
2016-03-01 19:27:36 +01:00
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
2017-04-18 17:04:44 +02:00
|
|
|
extern const char *log_procname;
|
2016-03-01 19:27:36 +01:00
|
|
|
|
2017-04-18 17:04:44 +02:00
|
|
|
void logit(int, const char *, ...)
|
|
|
|
__attribute__((__format__ (printf, 2, 3)));
|
|
|
|
void vlog(int, const char *, va_list)
|
|
|
|
__attribute__((__format__ (printf, 2, 0)));
|
|
|
|
void log_warn(const char *, ...)
|
|
|
|
__attribute__((__format__ (printf, 1, 2)));
|
|
|
|
void log_warnx(const char *, ...)
|
|
|
|
__attribute__((__format__ (printf, 1, 2)));
|
|
|
|
void log_info(const char *, ...)
|
|
|
|
__attribute__((__format__ (printf, 1, 2)));
|
|
|
|
void log_notice(const char *, ...)
|
|
|
|
__attribute__((__format__ (printf, 1, 2)));
|
|
|
|
void log_debug(const char *, ...)
|
|
|
|
__attribute__((__format__ (printf, 1, 2)));
|
|
|
|
void fatal(const char *)
|
|
|
|
__attribute__ ((noreturn))
|
|
|
|
__attribute__((__format__ (printf, 1, 0)));
|
|
|
|
void fatalx(const char *)
|
|
|
|
__attribute__ ((noreturn))
|
|
|
|
__attribute__((__format__ (printf, 1, 0)));
|
2016-03-01 19:27:36 +01:00
|
|
|
|
2017-04-18 17:04:44 +02:00
|
|
|
#endif /* LOG_H */
|