1
0
mirror of https://gitlab.xiph.org/xiph/icecast-common.git synced 2024-11-03 04:17:20 -05:00
icecast-common/log/log.h
oddsock 72ad409e7a win32 doesn't support line buffering with setvbuf() properly, so for win32
lets just set it to no-buffering for logs.

svn path=/trunk/log/; revision=4381
2003-02-27 03:02:30 +00:00

33 lines
757 B
C

#ifndef __LOG_H__
#define __LOG_H__
#include <stdio.h>
#define LOG_EINSANE -1
#define LOG_ENOMORELOGS -2
#define LOG_ECANTOPEN -3
#define LOG_ENOTOPEN -4
#define LOG_ENOTIMPL -5
#ifdef _WIN32
#define IO_BUFFER_TYPE _IONBF
#else
#define IO_BUFFER_TYPE _IOLBF
#endif
void log_initialize();
int log_open_file(FILE *file);
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();
void log_write(int log_id, int priority, const char *cat, const char *func,
const char *fmt, ...);
void log_write_direct(int log_id, const char *fmt, ...);
#endif /* __LOG_H__ */