MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / xlog_1

Function xlog_1

xlog.c:318–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316
317
318int xlog_1(struct sip_msg* msg, char* frm)
319{
320 int log_len, ret;
321
322 if(!is_xlog_printable(xlog_print_level))
323 return 1;
324
325 log_len = xlog_buf_size;
326
327 ret = xl_print_log(msg, (pv_elem_t*)(void*)frm, &log_len);
328 if (ret == -1) {
329 LM_ERR("global print buffer too small, increase 'xlog_buf_size'\n");
330 return -1;
331 }
332
333 /* set the xlog as log level to trick "LM_GEN" */
334 set_proc_log_level( *xlog_level );
335
336 /* log_buf[log_len] = '\0'; */
337 LM_GEN1(xlog_print_level, "%.*s", log_len, log_buf);
338
339 reset_proc_log_level();
340
341 return ret;
342}
343
344/**
345 */

Callers 1

do_actionFunction · 0.85

Calls 3

xl_print_logFunction · 0.85
set_proc_log_levelFunction · 0.85
reset_proc_log_levelFunction · 0.85

Tested by

no test coverage detected