FPS option part 2
[fswebcam.git] / log.h
blobb62c5f7c5e1c4906d5dbb1077d1cd02599cc62bf
1 /* fswebcam - FireStorm.cx's webcam generator */
2 /*===========================================================*/
3 /* Copyright (C)2005 Philip Heron <phil@firestorm.cx> */
4 /* */
5 /* This program is distributed under the terms of the GNU */
6 /* General Public License, version 2. You may use, modify, */
7 /* and redistribute it under the terms of this license. A */
8 /* copy should be included with this source. */
10 #ifndef INC_LOG_H
11 #define INC_LOG_H
13 #define FLOG_MESSAGE (0)
14 #define FLOG_ERROR (1)
15 #define FLOG_WARN (2)
16 #define FLOG_DEBUG (3)
17 #define FLOG_HEAD (4)
18 #define FLOG_INFO (5)
20 #define LOG(l, s, args...) \
21 log_msg(__FILE__, (char *) __FUNCTION__, __LINE__, l, s, ## args)
23 #define MSG(s, args...) LOG(FLOG_MESSAGE, s, ## args)
24 #define WARN(s, args...) LOG(FLOG_WARN, s, ## args)
25 #define ERROR(s, args...) LOG(FLOG_ERROR, s, ## args)
26 #define DEBUG(s, args...) LOG(FLOG_DEBUG, s, ## args)
27 #define HEAD(s, args...) LOG(FLOG_HEAD, s, ## args)
28 #define INFO(s, args...) LOG(FLOG_INFO, s, ## args)
30 extern void log_set_fd(int fd);
31 extern int log_open(char *f);
32 extern void log_close();
33 extern void log_quiet(char v);
34 extern void log_verbose(char v);
35 extern void log_debug(char v);
36 extern void log_syslog(char v);
38 extern void log_msg(char *file, char *function, int line, char l, char *s, ... );
40 #endif