Browse Source

log_custom: send processing logs via udp

(cherry picked from commit ec0dd71bd963d7bf5959521ff82b6a659efe699a)
Daniel-Constantin Mierla 5 years ago
parent
commit
fb952a9351
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/modules/log_custom/log_custom_mod.c

+ 2 - 2
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;
 		return 1;
 
 
 	if(fixup_get_svalue(msg, (gparam_t*)txt, &stxt)!=0) {
 	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;
 		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);
 	n += vsnprintf(obuf + n, LC_LOG_MSG_MAX_SIZE - n, format, arglist);
 	va_end(arglist);
 	va_end(arglist);
 	if(udp_send(&_lc_udp_dst, obuf, n)!=0) {
 	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);
 	}
 	}
 }
 }