2001-09-09 22:24:39 -04:00
|
|
|
#ifndef __LOG_H__
|
|
|
|
#define __LOG_H__
|
|
|
|
|
2002-01-29 04:20:28 -05:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2001-09-09 22:24:39 -04:00
|
|
|
#define LOG_EINSANE -1
|
|
|
|
#define LOG_ENOMORELOGS -2
|
|
|
|
#define LOG_ECANTOPEN -3
|
|
|
|
#define LOG_ENOTOPEN -4
|
2001-10-20 12:47:01 -04:00
|
|
|
#define LOG_ENOTIMPL -5
|
2001-09-09 22:24:39 -04:00
|
|
|
|
|
|
|
|
|
|
|
void log_initialize();
|
2002-01-29 04:20:28 -05:00
|
|
|
int log_open_file(FILE *file);
|
2001-09-09 22:24:39 -04:00
|
|
|
int log_open(const char *filename);
|
|
|
|
int log_open_with_buffer(const char *filename, int size);
|
|
|
|
void log_set_level(int log_id, int level);
|
|
|
|
void log_flush(int log_id);
|
|
|
|
void log_reopen(int log_id);
|
|
|
|
void log_close(int log_id);
|
|
|
|
void log_shutdown();
|
|
|
|
|
2002-08-03 04:14:56 -04:00
|
|
|
void log_write(int log_id, int priority, const char *cat, const char *func,
|
|
|
|
const char *fmt, ...);
|
2001-09-09 22:24:39 -04:00
|
|
|
void log_write_direct(int log_id, const char *fmt, ...);
|
|
|
|
|
|
|
|
#endif /* __LOG_H__ */
|