1 499b552c 2026-03-02 tb /* $OpenBSD: log.h,v 1.1 2026/03/02 21:59:28 tb Exp $ */
4 499b552c 2026-03-02 tb * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
6 499b552c 2026-03-02 tb * Permission to use, copy, modify, and distribute this software for any
7 499b552c 2026-03-02 tb * purpose with or without fee is hereby granted, provided that the above
8 499b552c 2026-03-02 tb * copyright notice and this permission notice appear in all copies.
10 499b552c 2026-03-02 tb * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 499b552c 2026-03-02 tb * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 499b552c 2026-03-02 tb * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 499b552c 2026-03-02 tb * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 499b552c 2026-03-02 tb * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 499b552c 2026-03-02 tb * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 499b552c 2026-03-02 tb * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 499b552c 2026-03-02 tb #include <sys/types.h>
23 499b552c 2026-03-02 tb #include <stdarg.h>
25 499b552c 2026-03-02 tb void log_init(int, int);
26 499b552c 2026-03-02 tb void log_procinit(const char *);
27 499b552c 2026-03-02 tb void log_setverbose(int);
28 499b552c 2026-03-02 tb int log_getverbose(void);
29 499b552c 2026-03-02 tb void log_warn(const char *, ...)
30 499b552c 2026-03-02 tb __attribute__((__format__ (printf, 1, 2)));
31 499b552c 2026-03-02 tb void log_warnx(const char *, ...)
32 499b552c 2026-03-02 tb __attribute__((__format__ (printf, 1, 2)));
33 499b552c 2026-03-02 tb void log_info(const char *, ...)
34 499b552c 2026-03-02 tb __attribute__((__format__ (printf, 1, 2)));
35 499b552c 2026-03-02 tb void log_debug(const char *, ...)
36 499b552c 2026-03-02 tb __attribute__((__format__ (printf, 1, 2)));
37 499b552c 2026-03-02 tb void logit(int, const char *, ...)
38 499b552c 2026-03-02 tb __attribute__((__format__ (printf, 2, 3)));
39 499b552c 2026-03-02 tb void vlog(int, const char *, va_list)
40 499b552c 2026-03-02 tb __attribute__((__format__ (printf, 2, 0)));
41 499b552c 2026-03-02 tb __dead void fatal(const char *, ...)
42 499b552c 2026-03-02 tb __attribute__((__format__ (printf, 1, 2)));
43 499b552c 2026-03-02 tb __dead void fatalx(const char *, ...)
44 499b552c 2026-03-02 tb __attribute__((__format__ (printf, 1, 2)));
46 499b552c 2026-03-02 tb #endif /* LOG_H */