<commit_before>/*
 * Copyright (c) 2019 Intel Corporation.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <sys/printk.h>
#include <ctype.h>
#include <logging/log.h>
#include <sys/printk.h>

#define HEXDUMP_BYTES_IN_LINE 8U

void z_log_minimal_printk(const char *fmt, ...)
{
	va_list ap;

	va_start(ap, fmt);
	vprintk(fmt, ap);
	va_end(ap);
}

void z_log_minimal_vprintk(const char *fmt, va_list ap)
{
	vprintk(fmt, ap);
}

static void minimal_hexdump_line_print(const char *data, size_t length)
{
	for (size_t i = 0U; i < HEXDUMP_BYTES_IN_LINE; i++) {
		if (i < length) {
			printk("%02x ", data[i] & 0xFF);
		} else {
			printk("   ");
		}
	}

	printk("|");

	for (size_t i = 0U; i < HEXDUMP_BYTES_IN_LINE; i++) {
		if (i < length) {
			unsigned char c = data[i];

			printk("%c", isprint((int)c) ? c : '.');
		} else {
			printk(" ");
		}<commit_msg>logging: log_minimal: Fix violation to rule 14.4<commit_after>/*
 * Copyright (c) 2019 Intel Corporation.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <sys/printk.h>
#include <ctype.h>
#include <logging/log.h>
#include <sys/printk.h>

#define HEXDUMP_BYTES_IN_LINE 8U

void z_log_minimal_printk(const char *fmt, ...)
{
	va_list ap;

	va_start(ap, fmt);
	vprintk(fmt, ap);
	va_end(ap);
}

void z_log_minimal_vprintk(const char *fmt, va_list ap)
{
	vprintk(fmt, ap);
}

static void minimal_hexdump_line_print(const char *data, size_t length)
{
	for (size_t i = 0U; i < HEXDUMP_BYTES_IN_LINE; i++) {
		if (i < length) {
			printk("%02x ", data[i] & 0xFF);
		} else {
			printk("   ");
		}
	}

	printk("|");

	for (size_t i = 0U; i < HEXDUMP_BYTES_IN_LINE; i++) {
		if (i < length) {
			unsigned char c = data[i];

			printk("%c", isprint((int)c) != 0 ? c : '.');
		} else {
			printk(" ");
		}
{'fraction_non_alphanumeric': 0.1765039727582293, 'fraction_numerical': 0.015891032917139614, 'mean_word_length': 3.6888297872340425, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5540398', 'n_tokens_mistral': 813, 'n_tokens_neox': 741, 'n_words': 167}