Module: sip-router
Branch: master
Commit: 408d7e9bfd485d3fc6c7eb99894098283729aad0
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=408d7e9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Mar 19 16:30:21 2014 +0100
core: L_NPRL aliased to L_ALERT-1 to allow printing messages without level name
- new defines LM_NPRL() and NPRL() are using it
---
dprint.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dprint.h b/dprint.h
index 0842988..59cba08 100644
--- a/dprint.h
+++ b/dprint.h
@@ -86,6 +86,7 @@
/*
* Log levels
*/
+#define L_NPRL -6 /* (L_MIN-1) to skip printing level prefix */
#define L_MIN -5
#define L_ALERT -5
#define L_BUG -4
@@ -321,6 +322,7 @@ void dprint_term_color(char f, char b, str *obuf);
*/
/*@ { */
#ifdef __SUNPRO_C
+# define NPRL(...) LOG(L_NPRL, __VA_ARGS__)
# define ALERT(...) LOG(L_ALERT, __VA_ARGS__)
# define BUG(...) LOG(L_BUG, __VA_ARGS__)
# define ERR(...) LOG(L_ERR, __VA_ARGS__)
@@ -340,6 +342,7 @@ void dprint_term_color(char f, char b, str *obuf);
# define DEBUG(...) DBG(__VA_ARGS__)
#else /* ! __SUNPRO_C */
+# define NPRL(fmt, args...) LOG(L_NPRL, fmt , ## args)
# define ALERT(fmt, args...) LOG(L_ALERT, fmt , ## args)
# define BUG(fmt, args...) LOG(L_BUG, fmt , ## args)
# define ERR(fmt, args...) LOG(L_ERR, fmt , ## args)
@@ -364,6 +367,7 @@ void dprint_term_color(char f, char b, str *obuf);
#define LM_GEN1 LOG
#define LM_GEN2 LOG_FC
+#define LM_NPRL NPRL
#define LM_ALERT ALERT
#define LM_CRIT CRIT
#define LM_ERR ERR