2010-08-08 10:06:34 +02:00
|
|
|
/* vi: set ts=2:
|
|
|
|
+-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de>
|
|
|
|
| | Enno Rehling <enno@eressea.de>
|
|
|
|
| Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
|
|
|
|
| (c) 1998 - 2003 | Henning Peters <faroul@beyond.kn-bremen.de>
|
|
|
|
| | Ingo Wilken <Ingo.Wilken@informatik.uni-oldenburg.de>
|
|
|
|
+-------------------+ Stefan Reich <reich@halbling.de>
|
|
|
|
|
|
|
|
This program may not be used, modified or distributed
|
|
|
|
without prior permission by the authors of Eressea.
|
|
|
|
*/
|
|
|
|
#ifndef H_UTIL_LOG
|
|
|
|
#define H_UTIL_LOG
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2011-03-07 08:02:35 +01:00
|
|
|
extern void log_open(const char *filename);
|
2010-08-08 10:06:34 +02:00
|
|
|
extern void log_close(void);
|
|
|
|
extern void log_flush(void);
|
|
|
|
|
|
|
|
#define log_error(x) _log_error x
|
2012-05-16 01:56:25 +02:00
|
|
|
#define log_debug _log_debug
|
2010-08-08 10:06:34 +02:00
|
|
|
|
|
|
|
/* use macros above instead of these: */
|
2012-05-17 00:52:37 +02:00
|
|
|
extern void log_warning(const char *format, ...);
|
2011-03-07 08:02:35 +01:00
|
|
|
extern void _log_error(const char *format, ...);
|
2012-05-16 01:56:25 +02:00
|
|
|
extern void _log_debug(const char *format, ...);
|
2012-05-16 07:21:59 +02:00
|
|
|
extern void log_info(const char *format, ...);
|
|
|
|
extern void log_printf(FILE * ios, const char *format, ...);
|
2010-08-08 10:06:34 +02:00
|
|
|
|
|
|
|
#define LOG_FLUSH 0x01
|
|
|
|
#define LOG_CPWARNING 0x02
|
|
|
|
#define LOG_CPERROR 0x04
|
2012-05-16 01:56:25 +02:00
|
|
|
#define LOG_CPDEBUG 0x08
|
|
|
|
#define LOG_CPINFO 0x10
|
2010-08-08 10:06:34 +02:00
|
|
|
|
|
|
|
extern int log_flags;
|
2012-05-16 07:21:59 +02:00
|
|
|
extern int log_stderr;
|
2010-08-08 10:06:34 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|