[Icecast-dev] [PATCH 03/31] LOGGING add non arg-counted macros.
Niv Sardi
nsardi at smartjog.com
Fri Jul 30 07:54:25 PDT 2010
Today everybody support varargs…
Signed-off-by: Niv Sardi <nsardi at smartjog.com>
---
src/logging.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/logging.h b/src/logging.h
index e04cb1b..2d6ee71 100644
--- a/src/logging.h
+++ b/src/logging.h
@@ -34,22 +34,30 @@ extern int playlistlog;
#define __func__ strrchr (__FILE__, '\\') ? strrchr (__FILE__, '\\') + 1 : __FILE__
#endif
+#define ERROR(args...) log_write(errorlog, 1, CATMODULE "/", __func__, args)
+
#define ERROR0(y) log_write(errorlog, 1, CATMODULE "/", __func__, y)
#define ERROR1(y, a) log_write(errorlog, 1, CATMODULE "/", __func__, y, a)
#define ERROR2(y, a, b) log_write(errorlog, 1, CATMODULE "/", __func__, y, a, b)
#define ERROR3(y, a, b, c) log_write(errorlog, 1, CATMODULE "/", __func__, y, a, b, c)
#define ERROR4(y, a, b, c, d) log_write(errorlog, 1, CATMODULE "/", __func__, y, a, b, c, d)
+#define WARN(args...) log_write(errorlog, 2, CATMODULE "/", __func__, args)
+
#define WARN0(y) log_write(errorlog, 2, CATMODULE "/", __func__, y)
#define WARN1(y, a) log_write(errorlog, 2, CATMODULE "/", __func__, y, a)
#define WARN2(y, a, b) log_write(errorlog, 2, CATMODULE "/", __func__, y, a, b)
#define WARN3(y, a, b, c) log_write(errorlog, 2, CATMODULE "/", __func__, y, a, b, c)
+#define INFO(args...) log_write(errorlog, 3, CATMODULE "/", __func__, args)
+
#define INFO0(y) log_write(errorlog, 3, CATMODULE "/", __func__, y)
#define INFO1(y, a) log_write(errorlog, 3, CATMODULE "/", __func__, y, a)
#define INFO2(y, a, b) log_write(errorlog, 3, CATMODULE "/", __func__, y, a, b)
#define INFO3(y, a, b, c) log_write(errorlog, 3, CATMODULE "/", __func__, y, a, b, c)
+#define DEBUG(args...) log_write(errorlog, 4, CATMODULE "/", __func__, args)
+
#define DEBUG0(y) log_write(errorlog, 4, CATMODULE "/", __func__, y)
#define DEBUG1(y, a) log_write(errorlog, 4, CATMODULE "/", __func__, y, a)
#define DEBUG2(y, a, b) log_write(errorlog, 4, CATMODULE "/", __func__, y, a, b)
--
1.7.1
More information about the Icecast-dev
mailing list