]>
Commit | Line | Data |
---|---|---|
4b292b55 VB |
1 | /* -*- mode: c; c-file-style: "openbsd" -*- */ |
2 | /* | |
3 | * Copyright (c) 2012 Vincent Bernat <bernat@luffy.cx> | |
4 | * | |
5 | * Permission to use, copy, modify, and/or distribute this software for any | |
6 | * purpose with or without fee is hereby granted, provided that the above | |
7 | * copyright notice and this permission notice appear in all copies. | |
8 | * | |
9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
16 | */ | |
17 | ||
18 | #ifndef _LOG_H | |
19 | #define _LOG_H | |
20 | ||
21 | /* log.c */ | |
22 | void log_init(int, const char *); | |
26fa5d17 | 23 | void log_warn(const char *, const char *, ...) __attribute__ ((format (printf, 2, 3))); |
26fa5d17 | 24 | void log_warnx(const char *, const char *, ...) __attribute__ ((format (printf, 2, 3))); |
26fa5d17 | 25 | void log_info(const char *, const char *, ...) __attribute__ ((format (printf, 2, 3))); |
26fa5d17 | 26 | void log_debug(const char *, const char *, ...) __attribute__ ((format (printf, 2, 3))); |
6f8925be | 27 | void fatal(const char*, const char *); |
4b292b55 VB |
28 | void fatalx(const char *); |
29 | ||
30 | void log_register(void (*cb)(int, const char*)); | |
31 | ||
32 | #endif |