MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / host_node_vprintf

Function host_node_vprintf

net/trace.c:38–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36static pthread_mutex_t trace_lock = PTHREAD_MUTEX_INITIALIZER;
37
38static void host_node_vprintf(loglvl lvl, host_node_type *host_node_ptr,
39 int flags, const char *fmt, va_list ap)
40{
41 struct netinfo_struct *netinfo_ptr = host_node_ptr->netinfo_ptr;
42
43 /* While my net changes bed in, I want to see all trace even if in
44 * "distress" mode. Later perhaps we can redirect this to ctrace. */
45 /*
46 if((flags & NETTRCF_SUPPRESS) && host_node_ptr->distress)
47 return;
48 */
49
50 Pthread_mutex_lock(&trace_lock);
51 logmsg(lvl, "%p [%s %s%s fd %d] ", (void *)pthread_self(), netinfo_ptr->service, host_node_ptr->host,
52 host_node_ptr->subnet, host_node_ptr->fd);
53 logmsgv(lvl, fmt, ap);
54 Pthread_mutex_unlock(&trace_lock);
55}
56
57void host_node_printf(loglvl lvl, host_node_type *host_node_ptr, const char *fmt, ...)
58{

Callers 2

host_node_printfFunction · 0.85
host_node_errfFunction · 0.85

Calls 2

logmsgvFunction · 0.85
logmsgFunction · 0.50

Tested by

no test coverage detected