Browse code

kamailio LM_* compatibility macros

- added LM_* macros (LM_ERR, LM_BUG a.s.o) for compatibility with
kamailio (for now they just use ser ERR, BUG ... macros)

Andrei Pelinescu-Onciul authored on 17/11/2008 23:58:18
Showing 1 changed files
... ...
@@ -244,13 +244,34 @@ int log_facility_fixup(void *handle, str *name, void **val);
244 244
 		#define WARN(...) LOG(L_WARN, "WARNING: " LOC_INFO __VA_ARGS__)
245 245
 		#define INFO(...) LOG(L_INFO, "INFO: "    LOC_INFO __VA_ARGS__)
246 246
 		#define BUG(...) LOG(L_CRIT, "BUG: "      LOC_INFO __VA_ARGS__)
247
+		#define NOTICE(...) LOG(L_NOTICE, "NOTICE: " LOC_INFO __VA_ARGS__)
248
+		#define ALERT(...) LOG(L_ALERT, "ALERT: " LOC_INFO __VA_ARGS__)
249
+		#define CRIT(...) LOG(L_CRIT, "CRITICAL: " LOC_INFO __VA_ARGS__)
247 250
 #else
248 251
 		#define DEBUG(fmt, args...) DBG("DEBUG: "       LOC_INFO fmt, ## args)
249 252
 		#define ERR(fmt, args...) LOG(L_ERR, "ERROR: "  LOC_INFO fmt, ## args)
250 253
 		#define WARN(fmt, args...) LOG(L_WARN, "WARN: " LOC_INFO fmt, ## args)
251 254
 		#define INFO(fmt, args...) LOG(L_INFO, "INFO: " LOC_INFO fmt, ## args)
252 255
 		#define BUG(fmt, args...) LOG(L_CRIT, "BUG: "   LOC_INFO fmt, ## args)
256
+		#define NOTICE(fmt, args...) \
257
+			LOG(L_NOTICE, "NOTICE: " LOC_INFO fmt, ## args)
258
+		#define ALERT(fmt, args...) \
259
+			LOG(L_ALERT, "ALERT: " LOC_INFO fmt, ## args)
260
+		#define CRIT(fmt, args...) \
261
+			LOG(L_CRIT, "CRITICAL: " LOC_INFO fmt, ## args)
253 262
 #endif
254 263
 
264
+/* kamailio/openser compatibility */
265
+
266
+#define LM_GEN1 LOG
267
+
268
+#define LM_ALERT ALERT
269
+#define LM_CRIT  CRIT
270
+#define LM_ERR ERR
271
+#define LM_WARN WARN
272
+#define LM_NOTICE
273
+#define LM_INFO INFO
274
+#define LM_DBG DEBUG
275
+
255 276
 
256 277
 #endif /* ifndef dprint_h */