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

Function init_log_event_cons

dprint.c:803–825  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

801}
802
803int init_log_event_cons(void)
804{
805 evi_log_id = evi_publish_event(evi_log_name);
806 if (evi_log_id == EVI_ERROR) {
807 LM_ERR("cannot register '%.*s' event\n",
808 evi_log_name.len, evi_log_name.s);
809 return -1;
810 }
811
812 log_msg_buf = pkg_malloc(log_msg_buf_size+1);
813 if (!log_msg_buf) {
814 LM_ERR("no pkg memory left\n");
815 return -1;
816 }
817
818 if (register_log_consumer(EVENT_CONSUMER_NAME, event_dprint,
819 log_event_level_filter, 1) < 0) {
820 LM_ERR("Failed to register 'event' log consumer\n");
821 return -1;
822 }
823
824 return 0;
825}
826
827static struct log_consumer_t *get_log_consumer_by_name(str *name)
828{

Callers

nothing calls this directly

Calls 2

evi_publish_eventFunction · 0.85
register_log_consumerFunction · 0.85

Tested by

no test coverage detected