Blame src/log.h

Packit e9ba0d
/* -*- mode: c; c-file-style: "openbsd" -*- */
Packit e9ba0d
/*
Packit e9ba0d
 * Copyright (c) 2012 Vincent Bernat <bernat@luffy.cx>
Packit e9ba0d
 *
Packit e9ba0d
 * Permission to use, copy, modify, and/or distribute this software for any
Packit e9ba0d
 * purpose with or without fee is hereby granted, provided that the above
Packit e9ba0d
 * copyright notice and this permission notice appear in all copies.
Packit e9ba0d
 *
Packit e9ba0d
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
Packit e9ba0d
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
Packit e9ba0d
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
Packit e9ba0d
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
Packit e9ba0d
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
Packit e9ba0d
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
Packit e9ba0d
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Packit e9ba0d
 */
Packit e9ba0d
Packit e9ba0d
#ifndef _LOG_H
Packit e9ba0d
#define _LOG_H
Packit e9ba0d
Packit e9ba0d
#include <stdio.h>
Packit e9ba0d
Packit e9ba0d
/* log.c */
Packit e9ba0d
void             log_init(int, int, const char *);
Packit e9ba0d
void             log_warn(const char *, const char *, ...) __attribute__ ((format (printf, 2, 3)));
Packit e9ba0d
void             log_warnx(const char *, const char *, ...) __attribute__ ((format (printf, 2, 3)));
Packit e9ba0d
void             log_info(const char *, const char *, ...) __attribute__ ((format (printf, 2, 3)));
Packit e9ba0d
void             log_debug(const char *, const char *, ...) __attribute__ ((format (printf, 2, 3)));
Packit e9ba0d
void             fatal(const char*, const char *) __attribute__((__noreturn__));
Packit e9ba0d
void             fatalx(const char *, const char *) __attribute__((__noreturn__));
Packit e9ba0d
Packit e9ba0d
void		 log_register(void (*cb)(int, const char*));
Packit e9ba0d
void             log_accept(const char *);
Packit e9ba0d
void		 log_level(int);
Packit e9ba0d
Packit e9ba0d
/* version.c */
Packit e9ba0d
void		 version_display(FILE *, const char *, int);
Packit e9ba0d
Packit e9ba0d
#endif