xref: /dpdk/lib/eal/common/eal_log.h (revision 99a2dd95)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2021 Mellanox Technologies, Ltd
3  */
4 
5 #ifndef EAL_LOG_H
6 #define EAL_LOG_H
7 
8 #include <stdio.h>
9 #include <stdint.h>
10 
11 /*
12  * Initialize the default log stream.
13  */
14 int eal_log_init(const char *id, int facility);
15 
16 /*
17  * Determine where log data is written when no call to rte_openlog_stream.
18  */
19 void eal_log_set_default(FILE *default_log);
20 
21 /*
22  * Save a log option for later.
23  */
24 int eal_log_save_regexp(const char *regexp, uint32_t level);
25 int eal_log_save_pattern(const char *pattern, uint32_t level);
26 
27 /*
28  * Convert log level to string.
29  */
30 const char *eal_log_level2str(uint32_t level);
31 
32 #endif /* EAL_LOG_H */
33