[sr-dev] git:master:ec0dd71b: log_custom: send processing logs via udp

Daniel-Constantin Mierla miconda at gmail.com
Mon Jan 20 08:51:00 CET 2020


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-01-20T08:50:44+01:00

log_custom: send processing logs via udp

---

Modified: src/modules/log_custom/log_custom_mod.c

---

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

---

diff --git a/src/modules/log_custom/log_custom_mod.c b/src/modules/log_custom/log_custom_mod.c
index 3d68012211..5253dad37e 100644
--- a/src/modules/log_custom/log_custom_mod.c
+++ b/src/modules/log_custom/log_custom_mod.c
@@ -122,7 +122,7 @@ static int w_log_udp(struct sip_msg* msg, char* txt, char* p2)
 		return 1;
 
 	if(fixup_get_svalue(msg, (gparam_t*)txt, &stxt)!=0) {
-		LM_ERR("unable to get text parameter\n");
+		udp_send(&_lc_udp_dst, "error: unable to get text parameter\n", 36);
 		return -1;
 	}
 
@@ -147,7 +147,7 @@ void _lc_core_log_udp(int lpriority, const char *format, ...)
 	n += vsnprintf(obuf + n, LC_LOG_MSG_MAX_SIZE - n, format, arglist);
 	va_end(arglist);
 	if(udp_send(&_lc_udp_dst, obuf, n)!=0) {
-		LM_DBG("udp send returned non zero\n");
+		udp_send(&_lc_udp_dst, "debug: previous udp send returned non zero\n", 43);
 	}
 }
 




More information about the sr-dev mailing list