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

Function event_dprint

dprint.c:557–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555static str evi_msg_str = str_init("message");
556
557static void event_dprint(int level, int facility, const char *module, const char *func,
558 char *format, va_list ap)
559{
560 evi_params_p list = NULL;
561 str s;
562 int n;
563 int suppressed;
564
565 suppressed = pt[process_no].suppress_log_event;
566
567 if (suppressed)
568 return;
569
570 pt[process_no].suppress_log_event = 1;
571
572 if (!evi_probe_event(evi_log_id)) {
573 pt[process_no].suppress_log_event = suppressed;
574 return;
575 }
576
577 if (!(list = evi_get_params())) {
578 pt[process_no].suppress_log_event = suppressed;
579 return;
580 }
581
582 init_str(&s, dp_time());
583 if (evi_param_add_str(list, &evi_time_str, &s)) {
584 LM_ERR("unable to add event parameter\n");
585 goto end_free;
586 }
587 n = dp_my_pid();
588 if (evi_param_add_int(list, &evi_pid_str, &n)) {
589 LM_ERR("unable to add event parameter\n");
590 goto end_free;
591 }
592 init_str(&s, dp_log_level_str(level));
593 if (evi_param_add_str(list, &evi_level_str, &s)) {
594 LM_ERR("unable to add event parameter\n");
595 goto end_free;
596 }
597
598 if (module && func) {
599 init_str(&s, module);
600 if (evi_param_add_str(list, &evi_module_str, &s)) {
601 LM_ERR("unable to add event parameter\n");
602 goto end_free;
603 }
604 init_str(&s, func);
605 if (evi_param_add_str(list, &evi_func_str, &s)) {
606 LM_ERR("unable to add event parameter\n");
607 goto end_free;
608 }
609 }
610
611 init_str(&s, log_prefix);
612 if (s.len) {
613 if (evi_param_add_str(list, &evi_prefix_str, &s)) {
614 LM_ERR("unable to add event parameter\n");

Callers

nothing calls this directly

Calls 8

evi_probe_eventFunction · 0.85
evi_get_paramsFunction · 0.85
init_strFunction · 0.85
dp_timeFunction · 0.85
dp_my_pidFunction · 0.85
dp_log_level_strFunction · 0.85
evi_raise_eventFunction · 0.85
evi_free_paramsFunction · 0.85

Tested by

no test coverage detected