1 /* 2 * Copyright (c) 2019 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 #ifndef LOG_FRONTEND_H_ 7 #define LOG_FRONTEND_H_ 8 9 #include <logging/log_core.h> 10 11 /** @brief Initialize frontend. 12 */ 13 void log_frontend_init(void); 14 15 /** @brief Standard log with no arguments. 16 * 17 * @param str String. 18 * @param src_level Log identification. 19 */ 20 void log_frontend_0(const char *str, struct log_msg_ids src_level); 21 22 /** @brief Standard log with one argument. 23 * 24 * @param str String. 25 * @param arg0 First argument. 26 * @param src_level Log identification. 27 */ 28 void log_frontend_1(const char *str, 29 log_arg_t arg0, 30 struct log_msg_ids src_level); 31 32 /** @brief Standard log with two arguments. 33 * 34 * @param str String. 35 * @param arg0 First argument. 36 * @param arg1 Second argument. 37 * @param src_level Log identification. 38 */ 39 void log_frontend_2(const char *str, 40 log_arg_t arg0, 41 log_arg_t arg1, 42 struct log_msg_ids src_level); 43 44 /** @brief Standard log with three arguments. 45 * 46 * @param str String. 47 * @param arg0 First argument. 48 * @param arg1 Second argument. 49 * @param arg2 Third argument. 50 * @param src_level Log identification. 51 */ 52 void log_frontend_3(const char *str, 53 log_arg_t arg0, 54 log_arg_t arg1, 55 log_arg_t arg2, 56 struct log_msg_ids src_level); 57 58 /** @brief Standard log with arguments list. 59 * 60 * @param str String. 61 * @param args Array with arguments. 62 * @param narg Number of arguments in the array. 63 * @param src_level Log identification. 64 */ 65 void log_frontend_n(const char *str, 66 log_arg_t *args, 67 uint32_t narg, 68 struct log_msg_ids src_level); 69 70 /** @brief Hexdump log. 71 * 72 * @param str String. 73 * @param data Data. 74 * @param length Data length. 75 * @param src_level Log identification. 76 */ 77 void log_frontend_hexdump(const char *str, 78 const uint8_t *data, 79 uint32_t length, 80 struct log_msg_ids src_level); 81 82 83 #endif /* LOG_FRONTEND_H_ */ 84