Module: sip-router
Branch: kamailio_3.0
Commit: 42d70e2e4826be99a063a3d900b167a62ae12985
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=42d70e2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Nov 6 21:51:47 2009 +0100
xlog(k): updated log levels
- new level L_BUG
- updated the documentation to match the code
- L_CRIT uses in the code L_CRIT2
- L_CRIT2 can be used in config as well, detection is based on the third
caracter
- credits to Klaus Darilion
---
modules_k/xlog/README | 13 +++++++------
modules_k/xlog/doc/xlog_admin.xml | 17 +++++++++++------
modules_k/xlog/xlog.c | 3 ++-
3 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/modules_k/xlog/README b/modules_k/xlog/README
index f1c7966..5d6163c 100644
--- a/modules_k/xlog/README
+++ b/modules_k/xlog/README
@@ -163,13 +163,14 @@ modparam("xlog", "prefix", "-xlog: ")
Meaning of the parameters are as follows:
* level - The level that will be used in LOG function. It can be:
- + L_ALERT - log level -3
- + L_CRIT - log level -2
+ + L_ALERT - log level -5
+ + L_BUG - log level -4
+ + L_CRIT - log level -3
+ L_ERR - log level -1
- + L_WARN - log level 1
- + L_NOTICE - log level 2
- + L_INFO - log level 3
- + L_DBG - log level 4
+ + L_WARN - log level 0
+ + L_NOTICE - log level 1
+ + L_INFO - log level 2
+ + L_DBG - log level 3
+ $pv - any valid pseudo-variable, that has an integer value.
See above options for valid log levels.
If it is not a pseudo-variable, then what really matters is the
diff --git a/modules_k/xlog/doc/xlog_admin.xml b/modules_k/xlog/doc/xlog_admin.xml
index 0db2da8..66f2232 100644
--- a/modules_k/xlog/doc/xlog_admin.xml
+++ b/modules_k/xlog/doc/xlog_admin.xml
@@ -168,12 +168,17 @@ modparam("xlog", "prefix", "-xlog: ")
<itemizedlist>
<listitem>
<para>
- L_ALERT - log level -3
+ L_ALERT - log level -5
</para>
</listitem>
<listitem>
<para>
- L_CRIT - log level -2
+ L_BUG - log level -4
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ L_CRIT - log level -3
</para>
</listitem>
<listitem>
@@ -183,22 +188,22 @@ modparam("xlog", "prefix", "-xlog: ")
</listitem>
<listitem>
<para>
- L_WARN - log level 1
+ L_WARN - log level 0
</para>
</listitem>
<listitem>
<para>
- L_NOTICE - log level 2
+ L_NOTICE - log level 1
</para>
</listitem>
<listitem>
<para>
- L_INFO - log level 3
+ L_INFO - log level 2
</para>
</listitem>
<listitem>
<para>
- L_DBG - log level 4
+ L_DBG - log level 3
</para>
</listitem>
<listitem>
diff --git a/modules_k/xlog/xlog.c b/modules_k/xlog/xlog.c
index c614105..ee352e7 100644
--- a/modules_k/xlog/xlog.c
+++ b/modules_k/xlog/xlog.c
@@ -257,7 +257,8 @@ static int xlog_fixup(void** param, int param_no)
switch(((char*)(*param))[2])
{
case 'A': xlp->v.level = L_ALERT; break;
- case 'C': xlp->v.level = L_CRIT; break;
+ case 'B': xlp->v.level = L_BUG; break;
+ case 'C': xlp->v.level = L_CRIT2; break;
case 'E': xlp->v.level = L_ERR; break;
case 'W': xlp->v.level = L_WARN; break;
case 'N': xlp->v.level = L_NOTICE; break;