summaryrefslogtreecommitdiff
path: root/logging.h
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-03-27 00:11:03 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:54:59 -0700
commit6b493a20e1dbf90a4e54d3be37027fa906220c31 (patch)
tree4bceed1a0432468d77b9a0fa4aa5b553dd38f96f /logging.h
parent65005a7f81f86590f7f03bd3d4019c485d0e3c77 (diff)
[PATCH] support log-priority levels in udev.conf
Diffstat (limited to 'logging.h')
-rw-r--r--logging.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/logging.h b/logging.h
index e7653ee1b8..904355cb2c 100644
--- a/logging.h
+++ b/logging.h
@@ -24,6 +24,7 @@
#ifndef LOGGING_H
#define LOGGING_H
+#define err(format, arg...) do { } while (0)
#define info(format, arg...) do { } while (0)
#define dbg(format, arg...) do { } while (0)
#define logging_init(foo) do { } while (0)
@@ -34,21 +35,27 @@
#include <unistd.h>
#include <syslog.h>
+#undef err
+#define err(format, arg...) \
+ do { \
+ log_message(LOG_INFO ,"%s: " format ,__FILE__ ,## arg); \
+ } while (0)
+
#undef info
#define info(format, arg...) \
do { \
- log_message(LOG_INFO , format , ## arg); \
+ log_message(LOG_INFO ,"%s: " format ,__FILE__ ,## arg); \
} while (0)
#ifdef DEBUG
#undef dbg
#define dbg(format, arg...) \
do { \
- log_message(LOG_DEBUG , "%s: " format , __FUNCTION__ , ## arg); \
+ log_message(LOG_DEBUG ,"%s: " format ,__FUNCTION__ ,## arg); \
} while (0)
#endif
-extern void log_message(int level, const char *format, ...)
+extern void log_message(int priority, const char *format, ...)
__attribute__ ((format (printf, 2, 3)));
#undef logging_init