summaryrefslogtreecommitdiff
path: root/debug.h
blob: 0bc6c46a2d922cbfe6f516b064eedb487b92ed5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * debug.h: A program for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 */

#ifndef __debug_h_
#define __debug_h_

#include "source.h"

extern void logger(cEPGSource *source, char logtype, const char* format, ...);
extern char *logfile;
extern int SysLogLevel;

#ifdef esyslog
#undef esyslog
#endif
#ifdef isyslog
#undef isyslog
#endif
#ifdef dsyslog
#undef dsyslog
#endif

#define esyslog(a...) logger(NULL,'E', a)
#define isyslog(a...) logger(NULL,'I', a)
#define dsyslog(a...) logger(NULL,'D', a)
#define tsyslog(a...) void( (logfile) ? logger(NULL,'T', a) : void() )

#define esyslogs(s,a...) logger(s,'E', a)
#define isyslogs(s,a...) logger(s,'I', a)
#define dsyslogs(s,a...) logger(s,'D', a)
#define tsyslogs(s,a...) void( (logfile) ? logger(s,'T', a) : void() )


#endif