Lines Matching refs:output
129 static int print_formatted(const struct log_output *output, in print_formatted() argument
136 length = cbvprintf(out_func, (void *)output, fmt, args); in print_formatted()
142 static int timestamp_print(const struct log_output *output, in timestamp_print() argument
155 length = print_formatted(output, "[%08lu] ", timestamp); in timestamp_print()
157 length = print_formatted(output, "[%016llu] ", timestamp); in timestamp_print()
187 length = print_formatted(output, "%s.%06uZ ", in timestamp_print()
190 length = print_formatted(output, in timestamp_print()
199 length = log_custom_timestamp_print(output, timestamp, print_formatted); in timestamp_print()
202 length = print_formatted(output, in timestamp_print()
220 length = print_formatted(output, "[%s.%03u,%03u] ", time_str, ms, in timestamp_print()
224 output, "[%04u-%02u-%02u %02u:%02u:%02u.%03u,%03u] ", in timestamp_print()
240 length = print_formatted(output, "[%s,%06uZ] ", time_str, in timestamp_print()
243 length = print_formatted(output, in timestamp_print()
262 length = print_formatted(output, in timestamp_print()
274 static void color_print(const struct log_output *output, in color_print() argument
280 print_formatted(output, "%s", log_color); in color_print()
284 static void color_prefix(const struct log_output *output, in color_prefix() argument
287 color_print(output, color, true, level); in color_prefix()
290 static void color_postfix(const struct log_output *output, in color_postfix() argument
293 color_print(output, color, false, level); in color_postfix()
297 static int ids_print(const struct log_output *output, in ids_print() argument
309 total += print_formatted(output, "<%s> ", severity[level]); in ids_print()
314 total += print_formatted(output, "[%s] ", in ids_print()
317 total += print_formatted(output, "[%p] ", tid); in ids_print()
322 total += print_formatted(output, "%s/", domain); in ids_print()
326 total += print_formatted(output, in ids_print()
354 static void hexdump_line_print(const struct log_output *output, in hexdump_line_print() argument
358 newline_print(output, flags); in hexdump_line_print()
361 print_formatted(output, " "); in hexdump_line_print()
366 print_formatted(output, " "); in hexdump_line_print()
370 print_formatted(output, "%02x ", data[i]); in hexdump_line_print()
372 print_formatted(output, " "); in hexdump_line_print()
376 print_formatted(output, "|"); in hexdump_line_print()
380 print_formatted(output, " "); in hexdump_line_print()
386 print_formatted(output, "%c", in hexdump_line_print()
389 print_formatted(output, " "); in hexdump_line_print()
394 static void log_msg_hexdump(const struct log_output *output, in log_msg_hexdump() argument
403 hexdump_line_print(output, data, length, in log_msg_hexdump()
439 static int syslog_print(const struct log_output *output, in syslog_print() argument
456 len += print_formatted(output, "%s ", in syslog_print()
457 output->control_block->hostname ? in syslog_print()
458 output->control_block->hostname : in syslog_print()
470 len += print_formatted(output, "%s ", in syslog_print()
476 len += print_formatted(output, "%p ", tid); in syslog_print()
485 len += print_formatted(output, "- "); in syslog_print()
490 len += print_formatted(output, "- - - "); in syslog_print()
549 len += print_formatted(output, in syslog_print()
573 static uint32_t prefix_print(const struct log_output *output, in prefix_print() argument
603 output, in prefix_print()
611 length += print_formatted(output, "%s ", tag); in prefix_print()
615 length += timestamp_print(output, flags, timestamp); in prefix_print()
620 length += syslog_print(output, level_on, func_on, &thread_on, domain, in prefix_print()
623 color_prefix(output, colors_on, level); in prefix_print()
626 length += ids_print(output, level_on, func_on, thread_on, domain, in prefix_print()
632 static void postfix_print(const struct log_output *output, in postfix_print() argument
635 color_postfix(output, (flags & LOG_OUTPUT_FLAG_COLORS), in postfix_print()
637 newline_print(output, flags); in postfix_print()
640 void log_output_process(const struct log_output *output, in log_output_process() argument
656 prefix_offset = prefix_print(output, flags, 0, timestamp, in log_output_process()
669 int err = cbpprintf(cb, (void *)output, (void *)package); in log_output_process()
676 log_msg_hexdump(output, (uint8_t *)data, data_len, prefix_offset, flags); in log_output_process()
680 postfix_print(output, flags, level); in log_output_process()
683 log_output_flush(output); in log_output_process()
686 void log_output_msg_process(const struct log_output *output, in log_output_msg_process() argument
699 log_output_process(output, timestamp, NULL, sname, (k_tid_t)log_msg_get_tid(msg), level, in log_output_msg_process()
703 void log_output_dropped_process(const struct log_output *output, uint32_t cnt) in log_output_dropped_process() argument
710 log_output_func_t outf = output->func; in log_output_dropped_process()
715 log_output_write(outf, (uint8_t *)prefix, sizeof(prefix) - 1, output->control_block->ctx); in log_output_dropped_process()
716 log_output_write(outf, buf, len, output->control_block->ctx); in log_output_dropped_process()
717 log_output_write(outf, (uint8_t *)postfix, sizeof(postfix) - 1, output->control_block->ctx); in log_output_dropped_process()