[sr-dev] git:5.3:cebbdd34: log_custom: send processing logs via udp

Daniel-Constantin Mierla miconda at gmail.com
Wed Jan 22 09:54:20 CET 2020


Module: kamailio
Branch: 5.3
Commit: cebbdd3424b500a24977a606d962c010b7a0295d
URL: https://github.com/kamailio/kamailio/commit/cebbdd3424b500a24977a606d962c010b7a0295d

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-01-22T09:42:47+01:00

log_custom: send processing logs via udp

(cherry picked from commit ec0dd71bd963d7bf5959521ff82b6a659efe699a)

---

Modified: src/modules/log_custom/log_custom_mod.c

---

Diff:  https://github.com/kamailio/kamailio/commit/cebbdd3424b500a24977a606d962c010b7a0295d.diff
Patch: https://github.com/kamailio/kamailio/commit/cebbdd3424b500a24977a606d962c010b7a0295d.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