Module: kamailio
Branch: master
Commit: a493e2e0006f89d2f8b5e903134407109ef587da
URL: 
https://github.com/kamailio/kamailio/commit/a493e2e0006f89d2f8b5e903134407109ef587da

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2024-12-02T20:19:45+01:00

xlog: use crit level with prefix for kemi xcrit() and xlog()

- GH #4048

---

Modified: src/modules/xlog/xlog.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/a493e2e0006f89d2f8b5e903134407109ef587da.diff
Patch: 
https://github.com/kamailio/kamailio/commit/a493e2e0006f89d2f8b5e903134407109ef587da.patch

---

diff --git a/src/modules/xlog/xlog.c b/src/modules/xlog/xlog.c
index 5ec3f6ccad5..98c6e49a0f9 100644
--- a/src/modules/xlog/xlog.c
+++ b/src/modules/xlog/xlog.c
@@ -924,10 +924,12 @@ int ki_xlog_get_level(str *slevel)
                llevel = L_ALERT;
        } else if(slevel->len == 5 && strncasecmp(slevel->s, "l_bug", 5) == 0) {
                llevel = L_BUG;
+       } else if(slevel->len == 7 && strncasecmp(slevel->s, "l_crit0", 7) == 
0) {
+               llevel = L_CRIT;
        } else if(slevel->len == 7 && strncasecmp(slevel->s, "l_crit2", 7) == 
0) {
                llevel = L_CRIT2;
        } else if(slevel->len == 6 && strncasecmp(slevel->s, "l_crit", 6) == 0) 
{
-               llevel = L_CRIT;
+               llevel = L_CRIT2;
        } else if(slevel->len == 5 && strncasecmp(slevel->s, "l_err", 5) == 0) {
                llevel = L_ERR;
        } else if(slevel->len == 6 && strncasecmp(slevel->s, "l_warn", 6) == 0) 
{
@@ -989,7 +991,7 @@ int ki_xalert(sip_msg_t *msg, str *lmsg)
 
 int ki_xcrit(sip_msg_t *msg, str *lmsg)
 {
-       return ki_xlog_ex(msg, NULL, L_CRIT, lmsg);
+       return ki_xlog_ex(msg, NULL, L_CRIT2, lmsg);
 }
 
 /**

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to