1 /* fswebcam - FireStorm.cx's webcam generator */
2 /*===========================================================*/
3 /* Copyright (C)2005 Philip Heron <phil@firestorm.cx> */
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. */
13 #define FLOG_MESSAGE (0)
14 #define FLOG_ERROR (1)
16 #define FLOG_DEBUG (3)
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
, ... );