diff options
author | Rainer Giedat <rainer@cvs.openbsd.org> | 2008-04-21 20:40:56 +0000 |
---|---|---|
committer | Rainer Giedat <rainer@cvs.openbsd.org> | 2008-04-21 20:40:56 +0000 |
commit | 2eb896a3c2545b2c1f068c4a4ea865cba56418a4 (patch) | |
tree | b4c4b2186f745d4ab97c4812b626304985b68b3a /usr.sbin/rtadvd/log.h | |
parent | e06955861e1dc82e1d1c55fa4694375ae703ede6 (diff) |
Clean up logging by introducing the logging API used in
other daemons and clean up the command line options.
For details, see rtadvd(8).
ok bluhm@, pyr@
Diffstat (limited to 'usr.sbin/rtadvd/log.h')
-rw-r--r-- | usr.sbin/rtadvd/log.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/usr.sbin/rtadvd/log.h b/usr.sbin/rtadvd/log.h new file mode 100644 index 00000000000..aeb2c5bc6b5 --- /dev/null +++ b/usr.sbin/rtadvd/log.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 20083, 2004 Henning Brauer <henning@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include <stdarg.h> + +void log_init(int); +void logit(int pri, const char *fmt, ...); + +void fatal(const char*); +void log_warn(const char*, ...) __attribute__((format(printf, 1, 2))); +void log_info(const char*, ...) __attribute__((format(printf, 1, 2))); +void log_debug(const char*, ...) __attribute__((format(printf, 1, 2))); + +void fatalx(const char*); +void log_warnx(const char*, ...) __attribute__((format(printf, 1, 2))); |