You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
752 B

9 years ago
/* Copyright 2016 Alex 'AdUser' Z (ad_user@runbox.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
9 years ago
#ifndef F2B_LOG_H_
#define F2B_LOG_H_
#define LOGLINE_MAX 1024
9 years ago
typedef enum {
log_debug = 0,
log_info = 1,
log_note = 2,
log_warn = 3,
log_error = 4,
log_fatal = 5
9 years ago
} log_msgtype_t;
void f2b_log_msg(log_msgtype_t l, const char *fmt, ...)
__attribute__ ((format (printf, 2, 3)));
void f2b_log_error_cb(const char *errstr);
void f2b_log_set_level(const char *level);
9 years ago
void f2b_log_to_file (const char *path);
void f2b_log_to_stderr();
void f2b_log_to_syslog();
9 years ago
#endif /* F2B_LOG_H_ */