aboutsummaryrefslogtreecommitdiffstats
path: root/debug.h
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2000-08-10 09:44:09 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2000-08-10 09:44:09 +0000
commit994c3f1ff0c2b7ab62cfa413827ab17667805aa5 (patch)
tree58f94e3a69cee7187c02a77f19890b99e0910cfc /debug.h
parent0cb72bf49d0a0decda8285f8fa5a559bffa9e118 (diff)
downloadlcd4linux-994c3f1ff0c2b7ab62cfa413827ab17667805aa5.tar.gz
[lcd4linux @ 2000-08-10 09:44:09 by reinelt]
new debugging scheme: error(), info(), debug() uses syslog if in daemon mode git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@64 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'debug.h')
-rw-r--r--debug.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/debug.h b/debug.h
index bd2b9fa..44bac26 100644
--- a/debug.h
+++ b/debug.h
@@ -1,4 +1,4 @@
-/* $Id: debug.h,v 1.1 2000/04/15 11:13:54 reinelt Exp $
+/* $Id: debug.h,v 1.2 2000/08/10 09:44:09 reinelt Exp $
*
* debug messages
*
@@ -20,6 +20,11 @@
*
*
* $Log: debug.h,v $
+ * Revision 1.2 2000/08/10 09:44:09 reinelt
+ *
+ * new debugging scheme: error(), info(), debug()
+ * uses syslog if in daemon mode
+ *
* Revision 1.1 2000/04/15 11:13:54 reinelt
*
* added '-d' (debugging) switch
@@ -32,7 +37,10 @@
#ifndef _DEBUG_H_
#define _DEBUG_H_
-extern int debugging;
-#define debug(args...) do { if (debugging) printf(__FILE__ ": " args); } while(0)
+void message (int level, const char *format, ...);
+
+#define debug(args...) message (2, __FILE__ ": " args)
+#define info(args...) message (1, args)
+#define error(args...) message (0, args)
#endif