summaryrefslogtreecommitdiff
path: root/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'debug.h')
-rw-r--r--debug.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/debug.h b/debug.h
new file mode 100644
index 0000000..0bc6c46
--- /dev/null
+++ b/debug.h
@@ -0,0 +1,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