]>
git.ipfire.org Git - thirdparty/lldpd.git/blob - src/log.h
1 /* -*- mode: c; c-file-style: "openbsd" -*- */
3 * Copyright (c) 2012 Vincent Bernat <bernat@luffy.cx>
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.
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.
24 void log_init(int, int, const char *);
25 void log_warn(const char *, const char *, ...) __attribute__ ((format (printf
, 2, 3)));
26 void log_warnx(const char *, const char *, ...) __attribute__ ((format (printf
, 2, 3)));
27 void log_info(const char *, const char *, ...) __attribute__ ((format (printf
, 2, 3)));
28 void log_debug(const char *, const char *, ...) __attribute__ ((format (printf
, 2, 3)));
29 void fatal(const char*, const char *) __attribute__((__noreturn__
));
30 void fatalx(const char *, const char *) __attribute__((__noreturn__
));
32 void log_register(void (*cb
)(int, const char*));
33 void log_accept(const char *);
37 void version_display(FILE *, const char *, int);