--- l2.h.in 2002/01/02 17:07:38 1.27
+++ l2.h.in 2002/01/30 15:42:44 1.28
@@ -99,10 +99,17 @@
/* macro describing all levels */
#define L2_LEVEL_ALL ((1 << (8+9+1))-1)
-/* macr describing all levels from highest (PANIC)
+/* macro describing all levels from highest (PANIC)
to and including a particular low level */
#define L2_LEVEL_UPTO(level) (((level)-1)|(level))
+/* macros for easy logging */
+#define log0(ctx,level,msg) l2_channel_log((ctx)->l2, L2_LEVEL_##level, "%P" msg)
+#define log1(ctx,level,msg,a1) l2_channel_log((ctx)->l2, L2_LEVEL_##level, "%P" msg, a1)
+#define log2(ctx,level,msg,a1,a2) l2_channel_log((ctx)->l2, L2_LEVEL_##level, "%P" msg, a1, a2)
+#define log3(ctx,level,msg,a1,a2,a3) l2_channel_log((ctx)->l2, L2_LEVEL_##level, "%P" msg, a1, a2, a3)
+#define log4(ctx,level,msg,a1,a2,a3,a4) l2_channel_log((ctx)->l2, L2_LEVEL_##level, "%P" msg, a1, a2, a3, a4)
+
/* list of return values */
typedef enum {
L2_OK, /* everything ok */
|