Lines Matching refs:context
40 syslog_context *context = (syslog_context *)malloc(sizeof(syslog_context)); in allocate_context() local
41 if (context == NULL) in allocate_context()
45 memcpy(context, &sTeamContext, sizeof(syslog_context)); in allocate_context()
46 return context; in allocate_context()
81 syslog_context *context = (syslog_context *)tls_get(sThreadContextSlot); in get_context() local
82 if (context == NULL) { in get_context()
86 *tls_address(sThreadContextSlot) = context = allocate_context(); in get_context()
88 if (context != NULL) in get_context()
89 return context; in get_context()
97 message_to_console(syslog_context *context, const char *text, va_list args) in message_to_console() argument
99 if (context->ident[0]) in message_to_console()
100 fprintf(stderr, "'%s' ", context->ident); in message_to_console()
101 if (context->options & LOG_PID) in message_to_console()
131 send_syslog_message(syslog_context *context, int priority, const char *text, in send_syslog_message() argument
134 int options = context->options; in send_syslog_message()
137 if ((context->mask & LOG_MASK(SYSLOG_PRIORITY(priority))) == 0) in send_syslog_message()
144 message_to_console(context, text, args); in send_syslog_message()
153 priority |= context->facility; in send_syslog_message()
162 strcpy(message.ident, context->ident); in send_syslog_message()
183 message_to_console(context, text, args); in send_syslog_message()
282 syslog_context *context = get_context(); in openlog_thread() local
285 strcpy(context->ident, ident); in openlog_thread()
287 context->options = options; in openlog_thread()
288 context->facility = SYSLOG_FACILITY(facility); in openlog_thread()
295 syslog_context *context = get_context(); in setlogmask_thread() local
296 int oldMask = context->mask; in setlogmask_thread()
299 context->mask = priorityMask; in setlogmask_thread()