1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright 2021 Mellanox Technologies, Ltd 3 */ 4 5 #ifndef LOG_INTERNAL_H 6 #define LOG_INTERNAL_H 7 8 #include <stdio.h> 9 #include <stdint.h> 10 11 #include <rte_compat.h> 12 13 /* 14 * Initialize the default log stream. 15 */ 16 __rte_internal 17 int eal_log_init(const char *id, int facility); 18 19 /* 20 * Determine where log data is written when no call to rte_openlog_stream. 21 */ 22 __rte_internal 23 void eal_log_set_default(FILE *default_log); 24 25 /* 26 * Save a log option for later. 27 */ 28 __rte_internal 29 int eal_log_save_regexp(const char *regexp, uint32_t level); 30 __rte_internal 31 int eal_log_save_pattern(const char *pattern, uint32_t level); 32 33 /* 34 * Convert log level to string. 35 */ 36 __rte_internal 37 const char *eal_log_level2str(uint32_t level); 38 39 /* 40 * Close the default log stream 41 */ 42 __rte_internal 43 void rte_eal_log_cleanup(void); 44 45 #endif /* LOG_INTERNAL_H */ 46