/*
** LOG: Simple minded message logging interface
** Copyright (C) 2002 Michael W. Shaffer <mwshaffer@angrypot.com>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.  
**
** You should have received a copy of the GNU General Public License
** along with this program (see the file COPYING). If not, write to:
**
** The Free Software Foundation, Inc.
** 59 Temple Place, Suite 330,
** Boston, MA  02111-1307  USA
*/

#ifndef LOG_H
#define LOG_H

enum log_levels {
	all = 0,
	trace,
	info,
	warn,
	severe,
	fatal
};

#define LOG(pri, msg) log_msg (pri, msg)

void log_init (void);
void log_free (void);
void log_set_level (int level);
void log_msg (int pri, char *msg);

void log_init_stderr (void);
void log_free_stderr (void);
void log_set_level_stderr (int level);
void log_msg_stderr (int pri, char *msg);

void log_init_file (void);
void log_free_file (void);
void log_set_level_file (int level);
void log_msg_file (int pri, char *msg);

void log_init_syslog (void);
void log_free_syslog (void);
void log_set_level_syslog (int level);
void log_msg_syslog (int pri, char *msg);

#endif /* LOG_H */



syntax highlighted by Code2HTML, v. 0.9.1